In their third year, Harry started having feelings for Hermione. He wanted to ask her out, but noticed how upset she would be after fighting with Ron. He realized how much she liked him, and didn't want to complicate things even more. After a few months, the his feelings for her went away.
(A/N) I do not ship Harry and Hermione. Never. No. Nada. Zero. You get my point.
