The popular police drama, which picked up a peak audience of 9.7m during its latest run, will return in both 2012 and 2013.
The series stars Alun Armstrong, Dennis Waterman, Amanda Redman and James Bolam as a group of former police officers who are brought out of retirement to help out with cases.
"New Tricks continues to grow and is a huge favourite with the audience, making it the highest-rating drama on TV so far this year," said the BBC's controller of drama commissioning Ben Stephenson.
"Amanda, Dennis, Alun and James are a dream team that BBC One viewers have taken to their hearts, and I'm thrilled the show will be back on our screens for two more years."
New Tricks executive producer Richard Burrell added: "The show's ability to be warm and humorous and tackle darker issues simultaneously makes it distinctive from other crime dramas.
"The audience's response to the current series of New Tricks has been phenomenal and I'm delighted we are able to repay their loyalty with another two brand new ten-part series."
Filming for the next series of New Tricks is due to begin later this year.
> New Tricks star: 'BBC afraid of offending anyone'
> Read more TV news