The 20 year old goalkeeper has impressed during his spell with the Cobblers and the Latics have been keen to extend his present deal to ward off any potential suitors.
Nicholls has played nineteen games for Northampton keeping an impressive seven clean sheets and winning a number of plaudits for his performances.
Latics boss Roberto Martinez said: “Seeing Lee’s progress from a younger age has been a joy and to have him stay here and continue his hard work is great news.
“Lee is a great goalkeeper and he has shown that at Northampton this season. He has had some outstanding performances and we are really looking forward to continuing to work with him.”
The new deal not only includes improved terms but will see the goalkeeper remain with the Latics for a further three years until 2015.