MIAMI — Wayne Ellington has enjoyed some big nights against Miami, and now the Heat are hoping he’ll have more while wearing their uniform.

Ellington has agreed to a $12 million, two-year contract with the Heat, a person with direct knowledge of the negotiations told The Associated Press on Sunday. The person spoke on condition of anonymity because the deal was in the process of being finalized.

The Heat will become Ellington’s seventh team in eight seasons. The shooting guard who won an NCAA title at North Carolina and was Most Outstanding Player of the Final Four in 2009 spent his first three years in Minnesota and has been on the move often since, playing for Memphis, Cleveland, Dallas, the Los Angeles Lakers and Brooklyn.

Yahoo Sports first reported the agreement with Ellington.

Also Sunday, the Heat completed the signing of former Toronto forward James Johnson to a $4 million, one-year contract, the terms of which were first reported by ESPN. The 6-foot-9 power forward averaged 5.0 points and 2.2 rebounds in about 16 minutes for the Raptors last season.

Ellington has four games of 25 or more points in his career, two of those coming against Miami. And his career best for 3-pointers in a game is seven, done twice — both times against Miami, first in 2012 when he was with the Grizzlies and again last December while with Brooklyn.

Miami needed a shooting guard after losing Dwyane Wade in free agency to the Chicago Bulls. Wade will be in Chicago on Monday for a physical and could sign his $47 million, two-year deal then as well. The Heat also are facing a Sunday deadline to make a decision on whether to match a $50 million, four-year offer sheet that guard Tyler Johnson accepted from the Nets.

advertisement | advertise on newsday

The arrivals of Ellington and Johnson are part of some big changes for the Heat so far this summer. Miami has already re-signed center Hassan Whiteside to a $98 million, four-year deal during this free-agency period and agreed to add forward Derrick Williams on a $5 million, one-year deal. They also signed rookie Rodney McGruder, a member of their summer league team, to a partially guaranteed three-year contract.

Miami is also closing in on re-signing co-captain Udonis Haslem to a deal that will pay him just under $3 million next season, which will be his 14th with the Heat.