A complaint filed by the Bureau of Alcohol, Tobacco, Firearms and Explosives says 62-year-old Nana Baffoe entered the United States on May 18.
Several days later, he met with a firearms dealer in Nashua, filled out paperwork saying he lived in Manchester and gave a cashier's check for $30,500.
Under federal law, a firearms dealer can only sell handguns to a resident of the state where the dealer is located.
The complaint said authorities found a Canadian driver's license in Baffoe's wallet and a document indicating his employer was in Canada.
Baffoe was ordered detained pending a hearing Monday.
A message seeking comment was left with the federal public defender's office.