The 24-year-old's contract with Walsall was due to expire this summer and he has signed a two-year deal at Sixfields.
"There were a lot of clubs in for him and I'm delighted we've got him," Town boss Aidy Boothroyd said after snapping up Nicholls to join Clive Platt as summer arrivals, while denying that either player had been signed to replace Bayo Akinfenwa.
"He's a striker who also plays wide right or wide left and what we've got with Alex is a really young talented player with lots of potential.
"He's really ambitious and I'm really excited about working with him."