What happened to Sam Witwicky (Shia LaBeouf) in the Transformers franchise, and is he likely to return in a future entry? Michael Bay was drawn to the original Transformers on the simple, relatable hook of the movie being about a boy and his first car; the fact the car was a transforming alien robot was simply a bonus. Shia LaBeouf was later cast as Sam Witwicky, the somewhat nerdy kid who gets unwittingly drawn into an intergalactic battle between the Autobots and the Decepticons.
Witwicky was the lead character of the first three movies, exiting after Transformers: Dark Of The Moon. This was due to LaBeouf’s desire to move on from blockbuster movies, and the series received a soft reboot with 2014's Transformers: Age Of Extinction. Mark Wahlberg was introduced as the awesomely named Cade Yaeger, a struggling inventor who - like Sam - is unwittingly drawn into the Autobot struggle. Cade later returned for Transformers: The Last Knight, but like LaBeouf, both Bay and Wahlberg decided to call time on their involvement with the franchise after that entry. While the answer may not please fans, the movie also somewhat explains what happened to Sam Witwicky.
Bay’s Transformers movies introduced increasingly convoluted mythology into the franchise, with The Last Knight really going for broke. The movie reveals King Arthur and Merlin teamed up with Transformers in the distant past to win a battle, with the Transformer’s gifting Merlin with an alien staff. In the present day, professor Edmund Burton (Anthony Hopkins) explains the Transformers have been helping humanity for centuries, and that Vivian Wembley is the last “Witwiccan,” a line descended from Merlin himself. This means only Wembley can weld Merlin’s staff and stop an impending Cybertron attack.
Burton also explains the Witwiccan Order are a secret society of adventurers tasked with protecting this alternate history, and he shows photos of members of this society, including Witwicky himself. Burton proclaims himself the last surviving member of this order, implying Sam died at some point between Dark Of The Moon and The Last Knight. This would be a pretty abrupt ending for the character, who previously survived death in Transformers: Revenge Of The Fallen.
That said, LaBeouf has been somewhat outspoken about the quality of the series since his departure, making it unlikely he would ever return to the role. The Last Knight at least provides some closure for the character, while leaving enough wiggle room for fans to argue he could still be alive. The movie doesn’t even attempt to explain what happened to Sam Witwicky or how he died, but with Bumblebee officially rebooting the Transformers series, his presumed death is likely canon.