Brian Windhorst breaks down the latest on Dwyane Wade, who is on the verge of a deal with the Bulls. (1:15)

Free agent Dwyane Wade has committed to join the Chicago Bulls.

"This was not an easy decision, but I feel I have made the right choice," Wade said in a letter released to The Associated Press on Wednesday.

"Watching the Bulls growing up inspired me at an early age to pursue my dream of becoming a basketball player," Wade wrote. "My most treasured memories were watching my dad play basketball on the courts of Fermi Elementary School and developing my game at the Blue Island Recreation Center. I have never forgotten where I came from, and I am thankful to have an opportunity to play for the team that first fueled my love of the game."

Wade has agreed to a two-year deal worth $47 million, according to the AP. The Miami Heat, Wade's team for his entire 13-year career, had a two-year, $40 million offer on the table for him.

Serving as guest host of "Live With Kelly" on Thursday, Wade told Kelly Ripa that he couldn't sleep or eat as he made the decision to leave Miami.

"I lost probably 5 to 10 pounds just not being able to eat," Wade said.

Wade also took a moment to thank the Heat fans who cheered for him over the years.

"We call it Heat Nation, just around the world, just by the way they embraced me. This little shy kid from Chicago came from Milwaukee to Miami and really grew up, and we did some special things together," he said. "I didn't do it by myself. I had some unbelievable teammates along the way."

I wanna say THANK YOU to #HeatNation... I've read and felt you guys love from afar. thank you for appreciating my 13 years. #FamilyAlways — DWade (@DwyaneWade) July 7, 2016

The hardest part was leaving u guys. Y'all have supported me thru all my UPs but most importantly my DOWNS. — DWade (@DwyaneWade) July 7, 2016

But Miami-Dade County to me..will always be Wade County!!! — DWade (@DwyaneWade) July 7, 2016

But acrimony had been building between Wade and the Heat over the past week. Wade met with Heat owner Micky Arison in New York on Monday.

"Miami dared a very proud man to go home, and that man's best friend [LeBron James] just won a title by going home," a source close to the process told ESPN's Ramona Shelburne.

Arison took to Twitter late Wednesday to thank Wade for his 13 years with the Heat.

Thank you @DwyaneWade for a great 13 yrs! You've had a tremendous impact on our community and our organization. We wish you all the best. — Micky Arison (@MickyArison) July 7, 2016

Pat Riley texted ESPN's Dan Le Batard for a story in The Miami Herald.

"SADDDDDDD!!!! SO saddddddd!" Riley's text said. "I will never forget the sixth game in Dallas in 2006. DW rebounded the ball, and threw it to the heavens and the Heat universe was perfect for that moment. Our first world championship. Our universe is not perfect today. It will be fraught with anger, judgment, blame instead of THANK YOU!!! Ten years ago. Ten years older. Ten years wiser. Ten years changed. All of us.

"Dwyane had a choice, and he made it. He went home," Riley's text continued. "Bad, bad summer for us. But there will be another 10 years, and it will be someone or something else in 2026. Move on with no blood or tears. Just thanks. I truly loved Dwyane, but families grow, change and get on with another life. He will always be a part of us. ALWAYS! And no more bruises and enough fighting. Let's just fly above it if we can and never forget. I feel his pain and pride for what pushed him over the ledge. Been there. Forever, for always, your coach I will be. FOREVER!"

Riley and Wade didn't have any direct contact during the negotiations, sources told ESPN's Michael Wallace. But Wade's representatives and the Heat maintained open lines of communication throughout his recent trip to Spain and again after Miami's front-office contingent returned from meeting with Kevin Durant in New York last weekend.

For the past two summers, Wade has dealt directly with Arison late in contract negotiations.

After Wade and the Heat failed to reach an accord Monday, the Bulls picked up their intensity in attempting to trade players, sources said. Wade and the Bulls entered serious negotiations late Wednesday after he held free-agent meetings during the day with several teams, sources said. The Bulls had ramped up efforts to clear space to give Wade the multiyear deal he has been seeking.

A source told ESPN's Chris Broussard that Jimmy Butler had a phone conversation with Wade in which he recruited him. Wade and Butler, who are both Marquette products, are looking forward to playing together, according to the source.

Wade also considered the Milwaukee Bucks because of the Marquette connection, the source told Broussard, but the Bucks couldn't get near Wade's asking price of two years, $50 million.

In an Instagram post Monday, Bulls forward Doug McDermott indicated he was willing to give up his No. 3, which Wade wore throughout his Heat tenure.

Deadstock. It's all yours D Wade. #welcome A photo posted by Doug McDermott (@dougmcd03) on Jul 6, 2016 at 10:37pm PDT

The Bulls had been gaining momentum on landing Wade and believed they had a trade partner willing to take on Jose Calderon to clear salary-cap space, sources told ESPN.

The Los Angeles Lakers have swooped in ahead of the Brooklyn Nets to acquire Calderon, according to league sources Wednesday. Calderon and two future second-round picks are headed to Los Angeles in exchange for a player to be named later, the sources said.

Calderon seemingly was headed to the Nets, but sources say Chicago informed Calderon's representatives that they are trading him to L.A. instead.

End Of An Era The Miami Heat have existed for 28 seasons, and they were much better during the 13 in which Dwyane Wade was part of the organization. Pre-Wade With Wade Seasons 15 13 Win pct .467 .582* Playoff app 8 11 Playoff win pct .392 .613* Conf finals 1 6 Titles 0 3 * 3rd in NBA since 2003-04

-- ESPN Stats & Information

Calderon became a focus of trade talks because he is in the final year of a contract that pays him $7.7 million.

The Bulls have also agreed to a trade that will send Mike Dunleavy to the Cleveland Cavaliers, according to sources.

James has long coveted Dunleavy as a teammate, a source said.

With the Bulls sending Calderon to the Lakers, according to sources, Chicago clears the way to create more than $20 million and beat the Heat's offer for Wade. Shipping Dunleavy out removes the $4.8 million he was slated to earn this season.

The richest offer for Wade had been from the Denver Nuggets, who offered him $52 million over two years. Wade met with the Nuggets on Wednesday.

Wade had told friends that if he ever left Miami, where he won three titles, it would be to play for his hometown Bulls, sources said.