The 34-year-old McDaniels replaces Pat Shurmur, who was hired by the Cleveland Browns as head coach earlier this month.
"We are happy to announce that Josh will be a part of our staff," coach Steve Spagnuolo said in a statement. "I've always recognized that he is one of the top offensive minds in the NFL. We think he is a great addition to our organization."
The Rams scheduled news conferences Wednesday for Spagnuolo and McDaniels, the latter by telephone.
Earlier Tuesday, sources said a significant snag in negotiations between the Rams and McDaniels had led the team to broaden its search to include coaches with the West Coast-system roots in which rookie quarterback Sam Bradford excelled during his rookie season.
The Rams even went through league channels Tuesday morning to request interviews with coaches including Bill Musgrave of the Falcons and Darrell Bevell of the Vikings. Musgrave is the assistant head coach/quarterbacks coach in Atlanta and Bevell has been in limbo as the offensive coordinator in Minnesota.
When Seattle fired offensive coordinator Jeremy Bates on Tuesday, McDaniels' name also surfaced in connection with that opening.
McDaniels parlayed success as an offensive coordinator with the New England Patriots into his first head coaching job and at age 32 was the NFL's youngest coach in 2009. He favors the spread offense, run by Bradford in college.
Bradford, the top pick of the last draft, broke several of Peyton Manning's NFL rookie records last season.
McDaniels was let go by the Broncos on Dec. 6, with four game left in the regular season and in the midst of the franchise's worst slump in four decades. After winning his first six games of his rookie season, the Broncos lost 17 of the last 22, and the team also had several of issues off the field.
McDaniels also was fined $50,000 by the NFL after a videographer violated league rules by videotaping a San Francisco 49ers practice in London in October.
The Rams made a six-victory improvement last year under Spagnuolo, who'll be entering his third season.
McDaniels was with the Patriots from 2001-08, and was a personnel assistant on the '01 team that beat the Rams in the Super Bowl. New England won two more Super Bowls and totaled four AFC championships in his eight seasons with the franchise, the last three as offensive coordinator.
In McDaniels' first season with the Broncos, Kyle Orton set career highs for pass, completions, passing yards, touchdown passes and passer rating while tying his career low for interceptions. Orton's 3,802 yards were the sixth highest for a season in Broncos history.
Last season, the Broncos were seventh in the NFL in passing yards and 13th in total offense.
Information from ESPN senior NFL analyst Chris Mortensen, ESPN NFL insider Adam Schefter and The Associated Press contributed to this report.