The Lakers and D'Antoni's agent, Warren LeGarie, confirmed the deal two days after the Lakers fired Brown five games into the season.
D'Antoni agreed to a three-year deal worth $12 million, with a team option for a fourth season.
D'Antoni got the high-profile job running the 16-time NBA champions only after the club's top brass extensively discussed the job with former Lakers coach Phil Jackson.
The 11-time NBA champion coach met with Lakers owners Jerry and Jim Buss and general manager Mitch Kupchak on Saturday to weigh a return for a third stint on Los Angeles' bench.
The Lakers instead went with D'Antoni, a respected offensive strategist who coached Lakers point guard Steve Nash in Phoenix during the best years of their respective careers. D'Antoni was less successful during four seasons in New York, but at least restored the once-moribund Knicks to competence before resigning last March.
"Dr. (Jerry) Buss, Jim Buss and Mitch Kupchak unanimously agreed that Mike was the best coach for this roster at this time," Lakers spokesman John Black said.
The 61-year-old D'Antoni underwent knee replacement surgery earlier this month, and could be physically limited early his tenure. Black said the Lakers aren't certain when D'Antoni will travel to Los Angeles to begin work.
Interim coach Bernie Bickerstaff will continue running the Lakers until D'Antoni arrives. Los Angeles beat Sacramento 103-90 on Sunday night, improving to 2-0 under Bickerstaff after a 1-4 start under Brown.
The Lakers' next game is Tuesday night against San Antonio at Staples Center.
After Brown's dismissal, Nash and Kobe Bryant both expressed enthusiasm about the prospect of playing for D'Antoni, although Bryant also campaigned eagerly for Jackson.
Bryant idolized D'Antoni while growing up in Italy, where D'Antoni was a star player for Olimpia Milano in the Italian pro league. D'Antoni also has been an assistant coach on various U.S. national teams featuring Bryant, including the gold medal-winning squad at the London Olympics.
Nash won two MVP awards while running D'Antoni's signature up-tempo offense for the final four seasons of the coach's five-year tenure with the Suns.
Nash and D'Antoni won at least 54 games each season and reached two Western Conference finals -- and they eliminated Bryant's Lakers from the first round of the playoffs in 2006 and 2007, still the only first-round exits of Kobe's 17-year career.
D'Antoni then coached New York to just one playoff appearance and no postseason victories. He also coached the Denver Nuggets during the lockout-shortened 1998-99 season.
But his NBA accomplishments can't measure up to Jackson, who won five titles and reached seven NBA finals during two stints totaling 11 seasons with Los Angeles.
Jackson walked away from the club 18 months ago after a second-round playoff sweep by Dallas, and Brown led Los Angeles to a 41-25 mark followed by another second-round playoff defeat last summer.
The Lakers then traded for Nash and Dwight Howard, setting up a season of enormous expectations for Brown -- but the Lakers struggled to learn his new, Princeton-influenced offense while playing mediocre defense.
After the Lakers stumbled out of the gate while Howard and Bryant missed preseason games to preserve their health, Nash incurred a small fracture in his leg during the Lakers' second regular-season game, keeping him out of the lineup for their past five games and for at least another week.
The Lakers have improved to 3-4 under Bickerstaff after following up their winless preseason with four losses in their first five regular-season games, the club's worst start since 1993.
Despite his reputation for offensive acumen, D'Antoni's NBA teams typically have played fairly solid defense, statistically speaking -- and they never had the imposing Howard or defensive stopper Metta World Peace in their lineups.
Nash had his best NBA seasons as the versatile quarterback of the Suns' offense under D'Antoni, and point guard Jeremy Lin became a star on the Knicks last season while filling much the same role.
D'Antoni resigned late last season following a six-game losing streak, surprising many observers, and former assistant coach Mike Woodson led the Knicks to the playoffs.
Phoenix visits Staples Center on Friday.