Episode 5 of "To My Beloved Thief" commences with Eun-jo and Prince Yi-yeol trapped within each other's bodies, igniting a flurry of panic. In Eun-jo's body, Prince Yi-yeol suffers from the aftermath of their fall from the rooftop. Meanwhile, Eun-jo (in Prince Yi-yeol's body) endeavors to navigate the palace towards her own body. Along the way, she encounters Hae-rim, who escorts her out of the palace.

She then sprints towards the well, where she last recalled seeing her own body. Encountering Yoon-bok, who is still searching for Gil-dong, she finds herself in a predicament. Given her appearance, Yoon-bok assumes she is the Prince and informs her of the mysterious circumstances surrounding the former Chief Censor's demise.
In a desperate attempt to cover her mistake, Eun-jo turns the conversation to Kim's death and enlists Yoon-bok to delve deeper into the investigation. Failing to locate her body at the well, she sneaks back to her new home, where she discovers the unconscious Prince in her body. As soon as he awakens, he realizes that the body swap wasn't a mere dream. They attempt to process what has transpired and devise a plan to reverse it.
Eun-jo suggests leaving her marital home since Prince Yi-yeol cannot be seen wandering around. The following day, on their way out, they bump into Jae-I, who is on his way from the mourning hall to check on her. Initially mistaking Jae-I for Eun-jo's husband, Prince Yi-yeol learns that she married her grandfather, who tragically passed away shortly after their wedding. Enraged but unable to confront Eun-jo due to the weight of her sacrifice, he leads her to a secluded spot where Eun-jo confesses that she lied to help him move on.
Throughout the day, Prince Yi-yeol and Eun-jo grapple with understanding the reasons behind the switch and how to reverse it. Hoping that the switch might be related to superstition, Eun-jo leads them to a shaman, but it proves ineffective. They then try hugging each other, believing it could be a physical connection, but this also fails.
The episode unfolds with a myriad of emotions and complexities, leaving viewers on the edge of their seats as they try to unravel the mystery behind the body swap and its implications on their lives.
As the switch occurred around curfew time the previous evening, they waited until curfew to attempt it again. Unfortunately, this didn't work either. Later that night, Dae-chu informed Prince Yi-yeol of the summons to the palace to see the Queen Dowager. Eun-jo learned the truth of Yi-yeol's identity and was both stunned and embarrassed, recalling all the rude and blunt comments she had made. She also worried that he might order her to be beheaded. However, Prince Yi-yeol asked her not to change, as he wanted their interactions to remain the same.
Realizing that the nightmare would most likely continue, they devised a new survival plan. It began with Eun-jo meeting the Queen Dowager. Prince Yi-yeol taught her how to behave like the Grand Prince to convince his mother. He accompanied her, dressed as a court lady. To make each other's lives more tolerable, they exchanged information about the people around them.
When Prince Yi-yeol returned to Eun-jo's home, he encountered Dae-II and her mother waiting for his return. They had arrived earlier to pay their respects and asked to see her. Jae-I led them to her room only to find it empty, so they waited for her return.
Dae-II was still angry at her for marrying the older man, and her mother asked to talk in private. He learned that Eun-jo had pushed through with the marriage despite her family's opposition. She had put others before her happiness and hidden her pain deep within. Although he struggled to relate to her mother, Prince Yi-yeol promised that he would not allow any harm to come to Eun-jo from now on.
Back at the palace, Eun-jo took advantage of the quiet night to explore her way around the palace. She ran into Geum-nok, leaving His Majesty's chamber. The smell of herbs led her to his room. Using her knowledge of herbs and medicinal incense, she realized that something strange was happening.
She defies the counsel of Prince Yi-yeol and ventures into the compound. Having previously gleaned from the court ladies that His Majesty suffers from a skin ailment, which is the reason behind the heavy use of incense, she musters her courage and explains to His Majesty that excessive incense can be detrimental to his health and might be the reason behind the non-healing wounds on his skin. She dispels the incense and ventilates his room. Meanwhile, Yoon-bok and his team encounter Gil-dong during a patrol, but he is killed. Earlier, a conversation between Seung-jae and Secretary Im revealed that the secretary had killed Chief Censor after discovering that he was drugging His Majesty. Seung-jae covered up his crime by leaving Gil-dong's name as a clue. He then hired a fake Gil-dong and had him killed to force Yoon-bok to close the case.
The next day, Prince Yi-yeol attends the older man's burial as the widow and overhears a conversation between Geum-nok and Secretary Im discussing the incense. On the way back from the funeral, Prince Yi-yeol learns about Gil-dong's death, while Eun-jo hears about it from Dae-chu. Later that night, they both appear at Gil-dong's grave and mistake each other for their enemies. They engage in a sudden sword fight that ends when they tear each other's masks off.