The officer, who had clung to the driver's door, fell to the ground as the vehicle slowed at the Allschwil border crossing at around 2pm, Basel-Country cantonal police said.
Police said the officer fired a shot from his pistol as the car headed off into France.
The officer, who was lucky to escape with only minor injuries, was taken to hospital for a check, police said.
No-one else was injured in the incident, which began when police said they had noticed something suspicious about the vehicle.
The getaway car was followed by Basel-Country police patrols and was stopped a short time later.
The vehicle's occupants, a Romanian man and woman, both 27 years old, were arrested by Basel-Country police with the assistance of the French national gendarmerie.
An investigation into the case is under way by the relevant authorities in France and Switzerland, police said.