Nobody talks about it, but the US played a role in the ouster of Ukrainian President Viktor Yanukovych. If Putin interfered in the US election, he may have seen it as a response to Obama’s interference in Ukrainian politics, which would have cost Russia its only warm water port, Sevastople, a strategic loss to Russia. Putin could not accept that loss, and subsequented invaded and reannexed Crimea.
I don’t know how involved the US was in the ouster of Yanukovych. Certainly the US pubicly supported the protesters against Yanukovych and chered his ouster. If the CIA or other Americans were more involved, Putin probably knows that, and wants to retaliate for it.
I don’t know whether Putin was actually involved in the hacking and leaks of election emails. I don’t know what involvement the US may have had in Ukrainian politics. Clearly there is a link between Ukraine and Trump in the person of Paul Manafort.