Mayor Sadiq Khan said the move was aimed at cutting waste and improving efficiency as well as helping to pay for a fares freeze over the next four years.
Private firm Amey has been contracted to manage maintenance work across the Jubilee, Northern and Piccadilly lines for the past 13 years, a legacy of the controversial Public Private Partnership (PPP).
Khan said: "I've asked Transport for London to carry out a root-and-branch review of all its business operations, and the decision to bring Underground maintenance work in-house will save tens of millions of pounds to invest in our transport network and pay for my freeze in TfL fares.
"London Underground already has experience running successful maintenance operations in-house, and we're making the changes as soon as the contract allows.
"Londoners still pay some of the highest fares in the world. I will continue to work with TfL to cut waste and inefficiency, and deliver the affordable and world-class transport system Londoners deserve."
Manuel Cortes, leader of the TSSA rail union, said: "This is good news for the travelling public.
"We are extremely pleased that a Labour Mayor has put the final nail in Tony Blair's failed Frankenstein Public Private Partnership which saddled Londoners and taxpayers with such huge costs.
"Sadiq has now rightly ended the costly fragmentation that this failed policy created."
If you’ve enjoyed this article, click on the link below to sign up for more similar stories in your region.
Our BQ Bulletin emails will land in your inbox at 7.30am, Monday to Friday, with a mix of the latest local business news, national news, and features to inspire you. Sign up here!
Click here to read our privacy statement