- "So, the Jedi are Force users united in our quest to understand the mysteries of the Force and to serve as guardians of peace and justice throughout the galaxy. […] we ground ourselves in a spiritual existence and give up individual attachments in order to focus entirely on greater concerns."
"So, that means no sex."
- ―The Jedi Padawan Reath Silas and Affie Hollow
The Jedi Code was a set of rules that governed the behavior of the Jedi Order. It taught its followers to not give in to feelings of anger toward other lifeforms, which would help them resist fear and prevent them from falling to the dark side of the Force. Odan-Urr was believed to have written the modern Jedi Code.
Amongst other dictates, the Jedi Code forbade Jedi Knights and Jedi Masters from taking on more than one Padawan at a given time; and forbade Jedi from forming attachments. Grand Master Yoda stressed that ceasing attachment was essential to prevent Jedi from becoming jealous, greedy, and afraid of loss, all of which were paths to the dark side. Ahsoka Tano also regarded attachment as dangerous, and rejected Grogu as an apprentice due to the foundling's bond with the Mandalorian bounty hunter Din Djarin. This practice of non-attachment did not mean the Jedi were strangers to compassion, as they considered it central to their way of life and believed all lives were precious, though outsider misunderstandings of this were not unusual. While Jedi did not marry, the Jedi Code banned neither romantic feelings nor familial love. The code forbade the Jedi from killing unarmed opponents as well as seeking revenge.
During the Clone Wars, there were those in the Grand Army of the Republic, such as Wilhuff Tarkin, who believed that the Jedi Code prevented the Order from doing what was necessary to win the war against the Confederacy of Independent Systems. Shortly before the end of the Clone Wars, the Jedi High Council, through Obi-Wan Kenobi, asked Anakin Skywalker to spy on his friend, Supreme Chancellor Sheev Palpatine, something which Skywalker felt was against the Jedi Code.
In 34 ABY, on Ahch-To, Rey heard the soft chanting of the Jedi Code emanating from the tree library that contained the original Jedi texts. The chanting compelled her to enter the library, where she found the texts and began learning more about the history of the Jedi Order from Master Luke Skywalker.
A Jedi such as Obi-Wan Kenobi, trained in the ways of the light side of the Force, could take comfort in the words of the mantra of the Jedi Code:
- There is no emotion, there is peace.
- There is no ignorance, there is knowledge.
- There is no passion, there is serenity.
- There is no chaos, there is harmony.
- There is no death, there is the Force.
There also existed an alternate version of the Code, recited by Jedi younglings during their Initiate Trials, and by Depa Billaba during her full fitness re-assessment after waking up from her 6-month coma:
- Emotion, yet peace.
- Ignorance, yet knowledge.
- Passion, yet serenity.
- Chaos, yet harmony.
- Death, yet the Force.
Following the Code
Conquering the dark side
- "Part of me you are, yes. But power over me you have not. Through patience and training, it is I who control you."
- ―Yoda, to the shadow of his soul
Jedi were taught to accept the inherent dark side within themselves and conquer it, and not let it conquer them. Fear of loss, anger, hate, jealousy, greed, and aggression—all of the dark side—had to be stripped from its influence over a Jedi through patience and training.
Love and attachments
- "Are you allowed to love? I thought that was forbidden for a Jedi."
"Attachment is forbidden. Possession is forbidden. Compassion, which I would define as unconditional love, is central to a Jedi's life. So you might say that we are encouraged to love."
- ―Padmé Amidala and Anakin Skywalker
While the Jedi Code forbade possession and attachments, the Jedi were encouraged and trained to love in terms of compassion. Attachment was the inability to accept change as the fundamental characteristic of life; to accept death as the natural part of life; the inability to let go. Feeding into fear of loss and greed, leading to jealousy, attachment was selfish, a shadow of greed and thus a path of the dark side of the Force. Therefore, attachment was forbidden for a Jedi, who had to train themselves to let go of everything they were afraid to lose; to renounce all attachments. Thus, they could be compassionate and loving and caring, but not be possessive and grabbing and holding on to things, trying to keep them frozen in time, accepting the transitional nature of life. This allowed them to love the totality of life unconditionally without selectively choosing individual life-forms to become selfishly attached to.
- "Falling in love—that's what the Jedi Code forbids. Getting laid? Not so much. Not if it's casual, like me and Selbie."
- ―Rael Averross defends casual sexual relationships to Qui-Gon Jinn
Members of the Jedi Order considered each other their family and sometimes were truly related by blood. Jedi Masters developed strong, trusting and loving bonds with their apprentices whom they raised, being like a parent to them. However, they were not supposed to form attachment—for the greater good, they had to be able to let go of them, to not lose a thousand lives just to save one. The Jedi considered romantic feelings natural and as such, they did not prohibited them, but for a Jedi Knight it was essential to make the right choice for the Order and not neglect their Jedi duties in the favor of their beloved, even if that would mean the end of the relationship.
Jedi Knight Rael Averross believed that the Jedi code permitted casual sexual relationships as long as the Jedi did not form attachments. Averross had such a relationship with Selbie, an innkeeper on Pijal, when he served as Lord Regent of that planet. His friend and fellow Jedi Qui-Gon Jinn did not agree with this belief.
Emotions and serenity
The Jedi were encouraged to rely on their instincts over their mind. They held their emotions valuable but were also warned to be mindful of them, for they could cloud their judgment. A Jedi had to maintain a serene, quiet mind in order to stand on the light side instead of the dark—thus, they were able to keep the Force within them in balance
Peace with death
- "Master Yoda, you can't die."
"Strong am I with the Force, but not that strong. Twilight is upon me, and soon night must fall. That is the way of things…the way of the Force."
- ―Luke Skywalker and Yoda
The Jedi knew that the universe was far from static, and the way of the Force was that all living eventually must die. They had a strong faith in the Force and found comfort in knowing that upon dying, they, just like all things that ever lived, would be transformed into the Cosmic Force, the wellspring from which the Living Force emanated, becoming one with it. Therefore, they saw death as the natural part of life; despite being saddened by it, they were advised to remember that one day they would all pass on, and rejoice and celebrate those around them who passed away and become one with the Force, instead of grieving and missing them. The fear of losing the living to inevitable death was attachment, the shadow of greed.
Behind the scenes
- "I, Luke Skywalker, do swear on my honor, and on the faith of the brotherhood of knights, to use the Force only for good, denying, turning always from the Dark Side; to dedicate my life to the cause of freedom, and justice. If I should fail of this vow, my life shall be forfeit, here and hereafter."
- ―Luke Skywalker's recitation of the "Jedi Oath"
The Jedi Code was first mentioned in the 1999 film Star Wars: Episode I The Phantom Menace. However, the Code's concept harkens back to early drafts for the 1980 film Star Wars: Episode V The Empire Strikes Back, in which Luke Skywalker takes the "Jedi Oath" before traveling to Cloud City in order to save his friends.
The "There is no emotion, there is peace" version of the Code first appeared in the 1987 Star Wars: The Roleplaying Game. It was there accompanied by a set of practical rules, more akin to a code of conduct, such as not acting for personal gain or trying as hard as possible to preserve life (while acknowledging that killing may at times be necessary). While the "mantra" part of the code lived on in later material, the code of conduct passed into obscurity. The "Emotion, yet peace" version of the mantra first showed up in the roleplaying game sourcebook Tales of the Jedi Companion from 1996.[source?]
The Jedi teaching on not forming attachments was misunderstood and misinterpreted in a number of Legends materials using "attachment" in terms of fondness, affection, love or loving commitment, making the misstatement that the Jedi were forbidding these emotional bonds. On the contrary, George Lucas explained, the Jedi were trained, allowed and expected to love people, even their enemies, the Sith, but they were not supposed to form attachments, because attachment led to the dark side of the Force. When one possessed or had some other attachment to something—be it pleasure, a person or experience—one became afraid to lose it. The fear of loss fed into greed; an attached person was selfish and unable to let go. This turned into anger, which would lead to hate, and hate would lead to suffering, mostly on the part of the one who was selfish, because then one would spend their lives being afraid rather than actually living. But compassion was caring and giving and thus it was love, but the opposite of attachment; it was everlasting joy, devoid of fear of loss and the pain of loss. "As long as you love other people and treat them kindly, you won't be afraid."
George Lucas, identifying himself as Buddhist Methodist or Methodist Buddhist, stated that his philosophy depicted in his movies was influenced by the fact that he was from San Francisco, the "Zen Buddhism capital of the United States." In 2020, he indicated that the Jedi were "designed to be a Buddhist monk who happened to be very good at fighting."