Lu will lead Microsoft's advertising strategy across all its online platforms as the company looks to better position itself against market leader Google.
McAndrews, the former CEO of aQuantive and senior vice president of Microsoft's advertiser and publisher group, will stay as a consultant for a number of months to assist with the transition.
In August, Lu left Yahoo! after 10 years of service, where he was instrumental in developing and monetising Yahoo!'s search platform. At Microsoft he will report directly to CEO Steve Ballmer.
Last month, Ballmer indicated after the latter's failed advertising deal with Google, which forced Yahoo! CEO Jerry Yang to . Despite Ballmer's words speculation continues to swirl over a possible deal in which Microsoft buys Yahoo!'s search division.
Lu's appointment comes two weeks after Microsoft named Sean Suchter, another former Yahoo! search executive, to head its Silicon Valley search technology centre.
Lu said in a press release: "Microsoft has built a great foundation for its search and advertising technologies and put an amazing team of researchers and engineers in place to drive the next wave of innovation in online services.
"I'm looking forward to working with them to help transform the way people and businesses use the Internet to find and share information."
Lu takes up his new role on January 5. He will oversee several groups including the advertiser and publisher, online audience, and OSG research, development and finance businesses.