Officials said Deputy Ricky Spivey attempted to perform the stop on Wimberly Road in Apex around 7:30 p.m.
While stopped, the driver, Michael Joseph Morgan, of Apex drove off in his vehicle dragging Spivey.
Deputy Casey Miller had arrived at the scene and shot at Morgan's vehicle, hitting him twice.
Morgan was taken to Duke Hospital in Durham with non-life threatening injuries. Spivey suffered minor injuries.
Officials said charges are pending against Morgan and that he will face felony assault with a deadly weapon on a government official.
Spivey has been with the Wake County Sheriff's Office for almost nine years, while Miller has served nearly six years.
The incident is under investigation by the North Carolina State Bureau of Investigation.