Muslim activists allege the shooting was a hate crime, but police told AFP those charges were still under investigation.
Anthony Mohamed, 26, from Hazelwood, a neighborhood in Pittsburgh, in the state of Pennsylvania, is charged with aggravated assault, criminal attempt homicide and recklessly endangering another person, police said.
The victim was identified by a local newspaper as a 38-year-old Moroccan immigrant. His name has not been released and officials say he wishes to remain anonymous for fear of safety.
The driver told the Pittsburgh Post-Gazette that the passenger asked whether he was from Pakistan and then talked about the extremist Islamic State group killing people.
“I noticed that he changed his tone and he began to satirize Mohammad, my prophet,” he was quoted as saying by the paper.
Police said Mohamed got into the taxi outside a casino at 1:13 am (0613 GMT) on November 26.
He allegedly asked the driver to wait so he could get money to pay the fare, but returned a few minutes later with a rifle.
As the victim drove off, he was shot in the back by a bullet that blew out the taxi’s rear window, police said.
He was taken to hospital in a stable condition.
Since the Paris attacks on November 13, activists have warned against an unprecedented anti-Muslim backlash in America, fueled by right-wing intolerance in the presidential campaign.