The WPP agency will start in September and handle all digital services, including natural and paid-for search, affiliates, digital display, social and content creation.
Maxus won the account in a final six-way pitch, after a three-stage review process.
Npower previously worked with LBi and Vizeum on its digital business. Vizeum will continue to run the offline media planning and buying business.
Jon Drinkwater, the head of digital at npower, said consumers increasingly select and run their energy supplier online, so the brand needed to communicate with them "at every step of their journey".
A 15-strong Maxus team will work with the npower digital marketing division, ahead of a marketing push focusing on what the energy supplier has called a "customer-centric" approach to the 6.5 million customers it serves with electricity, gas and energy.
Drinkwater said: "Because of the changing nature of the domestic energy market, digital has become an increasingly important part of our marketing and communications tool-kit. In Maxus we’ve found an agency that’s innovative, driven and hugely insightful about consumer behaviour."
Last month, the energy brand appointed McCann Manchester as its lead creative agency, ending its relationship with VCCP Blue and ending a 15-month long process.
Tim Irwin, chief operating officer at Maxus UK, said: "We start in September which is timely as this is when people consider the approaching winter and think about heating bills.
"This is a significant win for Maxus’ digital division which has seen strong performance and 25 per cent growth this year."