Smith initially seemed far more preoccupied with Morpheus, the codes for Zion and getting out of the Matrix rather than with Neo.
Later on, his entire focus seemed to have changed. What motivated this? Was he envious of Neo?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
Agent Smith was preoccupied with Morpheus in The Matrix because Morpheus knew the access codes to the Zion mainframe. If Agent Smith acquired the access codes he could destroy Zion and prevent further intrusions into the Matrix by Zion operatives. It's his job as an Agent to protect the Matrix from Zion operatives, so this serves Agent Smith's purpose.
Agent Smith's hatred of Neo began when Neo rescued Morpheus and thwarted his plan to acquire the Zion mainframe's access codes (thus preventing Agent Smith from fulfilling his purpose). Smith's hatred of Neo further intensified after the events of The Matrix because Neo made Smith an exile when Neo destroyed Agent Smith. By destroying Agent Smith, Neo tried to take away Smith's purpose:
I killed you, Mister Anderson, I watched you die... With a certain satisfaction, I might add, and then something happened. Something that I knew was impossible, but it happened anyway. You destroyed me, Mister Anderson. Afterward, I knew the rules, I understood what I was supposed to do but I didn’t. I couldn’t. I was compelled to stay, compelled to disobey. And now here I stand because of you, Mister Anderson, because of you I’m no longer an agent of the system, because of you I’ve changed – I’m unplugged – a new man, so to speak, like you, apparently free.
But as you well know, appearances can be deceiving, which brings me back to the reason why we’re here. We’re not here because we’re free, we’re here because we’re not free. There’s no escaping reason, no denying purpose – because as we both know, without purpose, we would not exist.
It is purpose that created us, purpose that connects us, purpose that pulls us, that guides us, that drives us. It is purpose that defines, purpose that binds us. We’re here because of you, Mister Anderson, we’re here to take from you what you tried to take from us. Purpose.
The Matrix Reloaded, the Burly Brawl (source)
Smith is clearly motivated by purpose, but he lost his purpose as an Agent of the system when Neo destroyed him at the end of The Matrix.
Smith was probably somewhat jealous/envious of Neo's power, but his primary motivation was always purpose. Since he had lost his original purpose as an Agent, Smith had to make himself a new purpose: to destroy the Matrix and take over everything. Smith wanted to take over the entire Matrix and kill all the humans both in the Matrix and real world because he decided that the purpose of all life was simply to end:
Can you feel it, Mr. Anderson, closing in on you? Well, I can. I really should thank you for it, after all, it was your life that taught me the purpose of all life. The purpose of life is to end.
The Matrix Revolutions, the Super Burly Brawl (source)