JK Rowling revealed in an interview that Draco Malfoy behaved antagonistically towards Hermione because he had romantic feelings for her, not because of her Muggle-born heritage. Due to his strict upbringing, Malfoy was unable to express his true feelings. Rowling also added that not unlike Severus Snape and Lily Potter, Malfoy would 'always' have lingering feelings for Hermione and very nearly fought with the Order during the Battle of Hogwarts because of it.
004. Draco Malfoy attended Fred Weasley’s funeral. He stood in the far back, careful not to be seen, and after he thought everyone had left, he lingered a bit. He’d never let on that he secretly thought the twins were quite funny, and he was truly sorry he’d been part of the reason that Fred died. He felt that way in regards to everyone that had been hurt and lost in the war, but he could barely get up the courage to go to Fred’s funeral, let alone anyone else’s. Draco would never tell anyone he was there, and George would never tell anyone he saw him cry, apologizing to a headstone.