My Frontier was doing this. The culprit was a rodent nest in the air filter box. I removed the nest, cleaned it our, put a sheet of fabric softener in the bottom of the box to keep the critters out. Seems to be okay now. My frontier did this as well. It turned out to be bad plug wires. If that isn't it make sure the air intake is clean, and your fuel pressure is correct and consistant (you will need a fuel pressure gauge to check this). Also try cleaning the throttle body, this can be done with a can of throttle body cleaner.
The 2003 Nissan Frontier has a 5-speed manual.
The 2005 Nissan Frontier has a 5-speed manual.
The 2006 Nissan Frontier has a 5-speed manual.
The 2009 Nissan Frontier has a 5-speed manual.
The 2008 Nissan Frontier has a 5-speed manual.
The 2007 Nissan Frontier has a 5-speed manual.
The 2001 Nissan Frontier has a 5-speed manual.
The 2010 Nissan Frontier has a 5-speed manual.
The 2011 Nissan Frontier has a 5-speed manual.
The 2014 Nissan Frontier has a 5-speed manual.
The 2013 Nissan Frontier has a 5-speed manual.
The 2012 Nissan Frontier has a 5-speed manual.