The 24-year-old suffered the break during the act of opening the scoring in Saturday's 2-0 win over Port Vale.
He was taken to hospital and had an intramedullary nail inserted into his tibia. He may also require a skin graft later this week.
Cobblers teammate Adebayo Akinfenwa tweeted: "Just spoke to Alex, op went well, still in some discomfort but his spirits are still high and he said to thank you all for the love and support he has received."
Vale captain John McCombe was shown a straight red card for the tackle which caused Nicholls's injury.