The Attack on the Statesman was an attempt by Thanos and the Black Order to extract the Space Stone from the Tesseract.
In 2017, following the Destruction of Asgard and the fulfilment of the doomsday prophecy Ragnarök, the Asgardians who survived became nomads forced to live aboard the Statesman, a pleasure vehicle previously used by the being known as the Grandmaster.
Acting on the orders of their newly crowned king, Thor Odinson, the Asgardians charted a course for Earth so they could channel their efforts into rebuilding their homeland.
A few months later, as the Statesman continued making its way through uncharted space, Thor's adopted brother Loki expressed his doubts about returning to Earth during a private conversation in the former's quarters. Despite the trickster god's skepticism about mankind welcoming him with open arms after the role he played in the Chitauri Invasion, Thor remained confident in his decision and claimed they had nothing to worry about.
At that exact moment, the two witnessed the Statesman being intercepted by the Sanctuary II, a warship under the command of the intergalactic warlord Thanos.
Unbeknownst to all, Thanos had tracked the Statesman down with the sole purpose of obtaining the Tesseract, which Loki took from Odin's Vault prior to Asgard's destruction, and extracting the Space Stone, which, in turn, would bring him one step closer to achieving his goal of exterminating half of all life in the universe.