Prior to the Tragedy and during his suspension, Nagito learned about Junko’s plan to throw the world into despair. Wanting to test her to see if she was worthy of becoming a stepping stone for hope, Nagito devised a plan to kill her before she could spread despair.
Upon being brainwashed into becoming an Ultimate Despair, Nagito developed strange, conflicting feelings of both love and hatred for Junko and saw her as his sworn enemy. This was most likely a result of both Junko's brainwashing and Nagito's own belief that hope cannot exist without despair. In Danganronpa Another Episode, Nagito describes Junko as someone he really hates, but in the end he reveals to Monaca Towa that he both loves and hates her, and he implies that he knew her very well, or at least thinks he did. Considering his very bizarre feelings about her, it's possible that he is just fabricating and doesn't know her that well at all.
After Junko was executed, Nagito cut off his left hand and put hers in its' place. He believes he did it because of his hatred towards her and to steal some essence of her power, but it's strongly implied that he, just like the other members, obsessed over her. While talking with Izuru Kamukura, he became increasingly agitated and conflicted about why he did it. When talking about AI Junko with him, Nagito appeared very excited to see her again so he may finally kill her, since he had both tried and failed to kill the real Junko.
After he awakened from his coma and his brainwashing was removed, he presumably retained his original hatred towards her and cut off her hand.
- “Then...will I be able to see her again? Will I be able to see the person I hate with every fiber of my being again? And this time... Will I be able to kill her time? The person I hate so much?”
- — Despair Nagito asking about the possibility to see Junko again, in Chapter 0 of Danganronpa 2.
- “Because she's my sworn enemy... Because I hate her so much... That's why I took her power. And for that I... Wait, huh? Do I...hate her? Huh...that's strange...”
- — Despair Nagito expressing his conflicting emotions towards Junko.
- “Someone like me, who both hates and loves her more than anyone else.”
- — Despair Nagito expressing his conflicting emotions towards Junko once again, in the Epilogue of Ultra Despair Girls.
- “In the end, despair is only a stepping stone to hope. So, you are only a stepping stone to hope.”
- — Nagito about Junko being a stepping stone to hope, in episode 8 of Despair Arc.
- “I wanted to see it... If a guy like me could kill you, you wouldn't be good enough to be a stepping stone to hope... No. In order to make everyone's hope shine, you must be absolute despair!”
- — Nagito about his thoughts on defeating Junko by himself.
- “I pray you can avoid my beating you, so you become a despair that makes all of them shine.”
- — Nagito not wanting to succeed in defeating Junko so that the others could defeat her despair.
Nagito canonically only had a crush on Hajime. His conflicting feelings for Junko haven't been shown in an explicitly romantic and sexual manner, unlike Mikan's feelings. However, it was never confirmed that he didn't loved her this way too. It's possible that he became interested in her in a romantic way because of her obsession of despair - perfectly balancing his own obsession of hope.