The team announced Sunday that it had re-signed Anthony, but did not disclose terms.
The contract will be for more than $122 million but less than the five-year, $129 million max figure, a source told ESPN The Magazine's Chris Broussard on Saturday.
"After three months of questions around Carmelo Anthony's return to the New York Knicks we are now happy to know that we have the cornerstone of what we envision as a 'team of excellence,'" Knicks president Phil Jackson said in a statement. "... [Knicks general manager] Steve Mills and I have assured Carmelo through our conversations, that we share the vision and the determination to build this team."
Jackson added later Sunday that Anthony had taken less than the maximum to give the Knicks cap flexibility.
"He did exactly what we kind of asked him to do. Give us a break in the early part of his contract so that when we have some wiggle room next year, which is hopefully big enough wiggle room, we can exploit it, provide a more competitive team for our group," Jackson said after the Knicks' summer league practice in Las Vegas.
Anthony and the Knicks had been in the final stages of negotiations since Saturday.
Anthony also announced the deal via his personal website on Sunday afternoon.
"A few years ago I dreamed of coming back to New York City, the place of my birth, and on February 23, 2011 that became a reality," Anthony said in a statement. "This organization has supported me and in return, I want to stay and build here with this city and my team. At this pivotal juncture in my career, I owed it to myself and my family to explore all of the options available to me. Through it all, my heart never wavered."
Anthony was being courted by the Knicks, Chicago Bulls, Dallas Mavericks, Houston Rockets and Los Angeles Lakers. He met with each team last week.
He was choosing between the Knicks and Bulls as recently as Friday, according to sources.
"I will always remember this chapter in my life. In the end, I am a New York Knick at heart," he said in the statement. "I am looking forward to continue my career in Orange & Blue and to work with Phil Jackson, a champion who builds championship teams. Madison Square Garden is the mecca of basketball and I am surrounded by the greatest fans in the world."
First-year Knicks coach Derek Fisher said he was thrilled to have the chance to coach Anthony, a seven-time All-Star.
"I have had the opportunity to be around some of the greatest players in our game, and now I have the honor of coaching Carmelo," Fisher said in a statement. "This is an exciting time for the New York Knicks franchise and our fans. I look forward to working with him and building something special together."
The Lakers were prepared to offer Anthony a max contract of $97 million over four years. The Bulls did not have enough cap space to make a similar offer, but could have offered Anthony a max contract via a sign-and-trade.
In bringing back Anthony, the Knicks have retained one of the top scorers in the NBA. Anthony averaged 27.4 points per game last season (second-best in the NBA) and a career-high 8.1 rebounds. Anthony is one of only five players to average 25 points per game and six rebounds per game in his career since the NBA merger. Michael Jordan, LeBron James, Kevin Durant and Karl Malone are the others.
The 30-year-old Anthony has averaged 26.5 points per game since coming to New York in 2011. That's tied with Bernard King for the second-highest scoring average in Knicks history.
Anthony operated heavily in isolation last season, which is not necessarily in concert with Jackson's triangle offense. Jackson said Sunday that Anthony is looking forward to operating within the triangle offense, which is predicated on player movement, spacing and passing.
"I talked to Carmelo a little bit about that in the process. One of the things about the offensive system is you can't try to score every time you catch the ball," Jackson said. "You have to participate and you also have to have guys who are strong enough to know that there's a whole offense to run and guys to all be involved, and if things happen, breakdowns, you need to have that man who can get shots on his own, then you have a guy that's a great bailout guy in Carmelo. So there are two things that go along with that, but I think that's what he's really looking for. He admired San Antonio's game and how they played, and that's the way we want to play."
With Anthony, Amar'e Stoudemire ($23.4 million) and Andrea Bargnani ($11.5 million) under contract for 2014-15, the Knicks are expected to be over the salary cap. Jackson had offered Stoudemire and Bargnani in trade talks with several teams in recent days, according to sources. He was unable to find a taker.
Assuming Stoudemire and Bargnani remain under contract, the Knicks will have only the $3.3 million tax payer's exception and veteran's minimum contracts to offer free agents this summer.
Jackson hinted that the Knicks would be prudent with their spending for the rest of the summer but made it clear that he would be looking to balance the guard-heavy roster.
"We've been a taxpayer team for a little bit and we want to limit that. So, we're not just going to foolishly throw money away because it's available to us," Jackson said. "We want to make an appropriate move that brings our team forward."
In the summer of 2015, the Knicks are projected to have at least $20 million in cap space. New York is expected to target the top free agents on the market that summer, a list which could include Memphis Grizzlies center Marc Gasol.
ESPNNewYork.com contributor Fred Katz contributed to this report.
Carmelo Anthony: 'Knick At Heart'
ESPNNewYork.com's Ian Begley discusses Carmelo Anthony's decision to re-sign with the Knicks.