The French police said that hacker, who was carrying his operation under pseudonym 'Hacker Croll', was nabbed in a joint operation with the FBI in the Puy-de-Dome region of central France.
The suspects had also hacked the Twitter accounts of various other celebrities with Britney Spears being one of his victims.
The hacker apparently had an access to Twitter's administrator codes and was able to create, modify or delete accounts at will. He tried to do the same with Obama's account, FBI said.
Police said that he tried to attacked Facebook and email accounts operated by Google and other providers.
They added that the suspect had also set up a blog to share his discoveries.
However, the suspects never attempted to make any financial profit from his hacking activities, police said.
Police said that the initial statements made by the suspect revealed that he was more driven by the challenge of the job rather the lure of money to carry out the act.
The French authorities were alerted by the FBI about the suspect's presence in the French territory in July 2009.
Four FBI agents along with the French police worked together to track down the suspect.