Tuesday's shooting angered Jordan's King Abdullah II, who instructed parliament speaker Saad Hayel Srour to hand over Sharif to police custody, according to a royal palace statement.
Amman prosecutor Abdullah Abol-Ghanam charged Sharif with attempted murder, possession of a firearm without a license, resisting police arrest and disturbing public order, according to an official in his office who could not be named because it was an ongoing case.
If convicted, he faces 15 years in jail.
The official said Qusai al-Dmeisi, the other deputy who was the target of the shooting, had lodged a complaint with the prosecutor earlier in the day.
He said Sharif was detained for 15 days, pending questioning.