The Sabres will receive a first-round draft pick in 2015 and a third-round draft pick in 2016 from the Blues as part of the deal.
If the Blues make the Western Conference Finals or the team re-signs with the Blues, the Sabres receive an additional first-round draft pick in 2014.
The Blues and Sabres had been discussing a trade since prior to the Olympic break and resumed negotiations this week. According to a source with knowledge of the situation, talks picked up significantly on Thursday and the deal was ultimately finalized Friday evening.
Miller, 33, has appeared in 40 games for Buffalo this season, posting a 15-22-3 record with a 2.72 goals-against average and a .923 save percentage.
The two-time All-Star has appeared 11 NHL seasons (all with Buffalo), posting a record of 284-186-57 along with a 2.60 goals-against average, .916 save percentage and 28 shutouts.
Miller was originally drafted by Buffalo in the fifth round, 138th overall, of the 1999 NHL Entry Draft.
Ott, 31, has dressed in 59 games as captain of the Sabres this season, ranking sixth on the club with 20 points (nine goals, 11 assists), while leading Buffalo forwards in ice time per game (19:42).
Over 11 NHL seasons with Dallas and Buffalo,Ott has complied 264 points (103 goals, 161 assists) in 673 career regular season games, as well as 1,318 penalty minutes, which ranks eighth among active skaters.
The Summerside, PE, Canada native was originally drafted by Dallas in the first round, 25th overall, of the NHL 2000 Entry Draft.
Halak played four seasons with the Blues after being acquired through a trade with the Montreal Canadiens following the 2009-10 season. In 2013-14, Halak has played 40 games for the Blues, earning a 24-9-4 record with a .917 SV% and 2.23 GAA.
Stewart played in parts of four seasons with the Blues, appearing in 58 games this season and tallying 26 points (15+11). In 2012-13, he led the Blues with 18 goals and 36 points.
A first-round pick (18th overall) by the Colorado Avalanche in the 2006 NHL Entry Draft, the Toronto native has amassed 228 points (115+113) in 377 games played.
Carrier was selected by the Blues in the second round (57th overall) of the 2013 NHL Entry Draft.