What was Oswald's stated motivation? So far as I know the only public statement Oswald made indicated that he was "just a patsy".
Oswald was a member of something called the "Fair Play for Cuba" committee, which opposed U.S. policy towards Castro. He was an admirer of the Soviet Union, moved there, and married a Russian woman. There was also a story several years back from a Russian KGB agent that Oswald offerred his services to the KGB in Mexico City. The KGB boys supposedly thought he was too much of a nut to be trusted. So maybe the story of Oswald and the Cuban agents in Mexico City isn't that far-fetched.