WARNING: The following article contains spoilers for director Rian Johnson's Star Wars: The Last Jedi, in theaters now.
Fans had to wait until the very end of Star Wars: The Force Awakens to learn what happened to Luke Skywalker after his failure to train his nephew Ben Solo in the ways of the Jedi. In the closing moments, Rey finally met the legendary Jedi Master on the ocean world Ahch-To in hopes of coaxing him out of self-imposed exile. However, a surprised Luke didn't utter a single word as the movie ended.
The abrupt conclusion of The Force Awakens left it to Rian Johnson's Star Wars: The Last Jedi to explain Luke's apparent disappointment, and why he withdrew from the galaxy. Some even theorized he had turned to the Dark Side. However, fans who follow Marvel Comics' Darth Vader series didn't have to wait for the new film to find out about the mystery of Luke going into seclusion.
In Darth Vader #2, written by Charles Soule and illustrated by Giuseppe Camuncoli, Emperor Palpatine sends his new apprentice, Lord Vader, to take a kyber crystal from a Jedi in order to power his own lightsaber. For that, Vader required someone who survived the purge in Revenge of the Sith, and therefore sought out a Jedi who took the Barash vow, a vow to disengage from the Order and remain in solitude as an act of penance.
While The Last Jedi doesn't mention the oath by name, it's obvious Luke took that very vow when he severed all ties with the galaxy, and the Force, and retreated to Ahch-To. It's worth noting that Rey said she felt as if Luke had cut off all connection to the Force, but in the comics those who take the oath still manage to harness its power. They do not, however, act on it, which aligns with the actions of the older Luke, who ignored the Resistance and allowed Supreme Leader Snoke and the First Order to tighten their grip on the galaxy.
In this inactivity, Luke's vow made him bitter but repentant, which we later find out stems from the fact that he selfishly contemplated murdering Ben Solo in his sleep, in hopes of sparing the galaxy from what he would become. That pushed his nephew, already being influenced by Snoke, to then embrace his dark destiny. In other words, Luke bears responsibility for Ben Solo's transformation into Kylo Ren.
Guilt-ridden, Luke cut off communication with the rest of the universe, and abandoned technology to avoid being tracked. His seclusion is so complete that it takes him a while to realize Rey and Kylo are mentally linked, and that his location could be compromised.
That said, in the comics, the Jedi Kirak, in his Barash, was merely awaiting his true purpose. That ended up being a duel with Vader, which he sadly lost on the river moon of Al'doleem at a sacred Jedi monastery. Coincidentally, Ahch-To's history is strongly tied to the Force, acting as a monastery as well for Luke, where he brought all the ancient books of the Jedi he had collected. That would seem to confirm that Luke took the Barash vow, which involves Jedi staying in spiritual places connected to their legacy.
Luke ultimately finds purpose and strength once again, to use the Force to project is form to the planet Crait and trick Kylo Ren into a fight. That's designed only as a distraction, however, to permit the remaining Resistance to escape the First Order. However, Luke's actions subsequently draws all the life-force from his physical body, leading to a peaceful death amid Ahch-To's sunsets. It beautifully redeems him in the process, and ensures his vow wasn't in vain.
In theaters now, director Rian Johnson’s The Last Jedi stars Daisy Ridley as Rey, John Boyega as Finn, Oscar Isaac as Poe Dameron, Adam Driver as Kylo Ren, Mark Hamill as Luke Skywalker, Carrie Fisher as Leia Organa, Andy Serkis as Supreme Leader Snoke, Domhnall Gleeson as General Hux, Kelly Marie Tran as Rose Tico and Laura Dern as Vice Admiral Amilyn Holdo.