Alex Fernandez-Pena, 32, and Juan Jose Rodriguez, 20, both of Philadelphia, were charged with carjacking and brandishing a firearm during a crime of violence, according to United States Attorney Jennifer Arbittier Williams.
The attack happened around 2:40 p.m. on January 3 in the 1100 block of N. 40th Street.
Police say the incident began when the 38-year-old Lyft driver was rear-ended by another vehicle twice.
After the Lyft driver exited his vehicle, Fernandez-Pena allegedly pointed a 12-gauge shotgun at the driver and then drove off with the Lyft vehicle after its passenger escaped through a rear door.
But as he drove off, the Lyft driver - who police say has a valid permit to carry - fired his gun at Fernandez-Pena
Investigators said Rodriguez tried to hit the Lyft driver with his vehicle, and the Lyft driver fired again.
Philadelphia police officers subsequently captured both defendants nearby. .
The victim was not hurt during this incident, police say.
Fernandez-Pena and Rodriguez were taken into federal custody and will make their initial appearances on Friday.