Loki can be seen brandishing the Tesseract — a.k.a. the Space Stone — in the first trailer, confirming theories the trickster swiped the Tesseract from Odin's hall of treasures in Thor: Ragnarok.
It's assumed the Asgardian stole the Space Stone to turn over to Thanos, who Loki served way back in The Avengers.
"If the Tesseract is kept from us, there will be no realm, no barren moon, no crevice we cannot find you," threatened The Other, who warned Loki not to fail or doublecross Thanos.
It's presumed Loki hands the Tesseract over to Thanos, whose ship, the Sanctuary II, confronts the Statesman — the spaceship used by Thor, Loki, Hulk, and Valkyrie to shepherd the Asgardians from a destroyed Asgard — in Ragnarok's mid-credits scene.
Loki is terrified of Thanos, and rightfully so, and Thor's half-brother always been untrustworthy — but what if he's using that to help the good guys?
The demigod seemingly redeemed himself in Thor: The Dark World, dying in the process, only for his sacrifice to have been revealed as a fake out: Loki faked his death to assume control of the throne, a sly facade that was shattered in Ragnarok.
It was there Loki seemed to finally and actually redeem himself: despite his earlier selfish motivations, he went Thor's side to help his brother rescue the Asgardians from certain doom at the hands of Hela and Surtur.
Come Infinity War, it could go either way with the impish Loki: he's either reverting to his me-first ways and pledging his allegiance to Thanos, or he's giving the good guys a much-needed assist.
The Loki we see might not even be him: it could be Loki projecting an illusion of the Tesseract to buy time, or it actually is Loki and he's handing the Tesseract off to someone else — like the Hulk, who Loki is also terrified of, and who just so happens to crash land in Doctor Strange's Sanctum Sanctorum back on Earth, someone who Loki met and knows to be a powerful sorcerer in Ragnarok.
Thanos does come to possess the Space Stone — it's seen in Thanos' gauntlet, which also wields the Power Stone — but Loki very well could have taken steps to play keep-away with the supremely powerful stone, even if it cost him his life.
Avengers: Infinity War opens May 4.