Tim Hardaway Jr. is making his return to Atlanta at the perfect time. He’s emerging from a career-high 38 points and arriving at Philips Arena on Friday with a team that is the one of the biggest surprises in the NBA at 10-7.

When Hardaway left Atlanta, he felt he made the right choice, and now he knows it. There was criticism when the Knicks signed Hardaway in July, but sometimes you can come back home. And he has made himself at home in his second stint with the Knicks.

“I’m thankful to be back here, man,” Hardaway said on Thanksgiving Eve, after the Knicks staged a historic 41-10 third quarter, which included a 28-0 run, to beat the Raptors. “It’s a wonderful opportunity for me. I’m happy. I’m excited. This group loves one another. You can see it on the floor. We’re playing for one another. The passion is there, and we continue to find our identity.”

Nobody knows what the Hawks’ threshold for bringing back Hardaway was, but sources have said it was significantly lower than the four-years and $71 million Knicks president Steve Mills lavished on him.

The Knicks still were worried they would strike out on another free agent because the Hawks could have matched the offer for Hardaway, a restricted free agent. But Atlanta passed and the Knicks got shredded for overpaying a player they already had traded and who never had been a full-time starter at the Garden.

“There was that concern,” Jeff Hornacek said of the potential the Hawks would make a matching offer. “Tim had started to turn the corner in terms of being a great player. He finished last season having a very, very good second half. We knew that was the beginning. I don’t think there was concern bringing him back. Mills did a great job of figuring out how to get him and what it might take. There was concern Atlanta might match it. When they didn’t, we were very happy.”

Nobody is bothering Hardaway now about his lucrative pact. The Knicks’ new identity is tied to Hardaway being the second scoring option to Kristaps Porzingis and a suddenly stout defender.

In a recent Slam Magazine article, Hardaway said he feels more like a Knick in his second stint by living in Harlem and not Westchester County, near the practice facility.

“It was the place I wanted to live for the culture,” Hardaway said. “It’s nice. It’s a great community, great neighborhood. People are great. Everyone’s great in New York, but it’s family-oriented. I don’t get bothered.”

After a slow start, Hardaway’s scoring average is up to 18.4 points per game, collecting 4.5 rebounds and 3.3 assists and making a solid swingman tandem with Courtney Lee. He also hasn’t missed a game, despite various ailments.

Now he goes back to Atlanta, where he served a two-year internship on defense. Former Knicks president Phil Jackson couldn’t get rid of the 2013 first-round pick fast enough in 2015.

Not exactly a media darling, Hardaway declined to discuss his return to Atlanta.

“I have no idea what’s going to happen,” Hardaway said. “I’m going to enjoy this tonight. Ask me that question on Friday.”

Hardaway does know — and he felt it more with the Hawks — the outpouring of support the Knicks get in Atlanta. And there’s now more reason for Knicks fans to dominate the arena Friday. The rebuilding Hawks are last place in the East at 3-15.

Part of the Knicks’ success is because of the working of the Hardaway-Lee 2-3 tandem — however unconventional. They’re both shooting guards, and Hornacek rotates their positions pending matchups.

“They’re both two-way players,” Hornacek said. “There’s a lot of talk Tim stepped up his defense since his rookie year. In Atlanta, they forced him to play defense. He’s doing a great job of that. Both guys feel comfortable. Tim at the 3 is undersized, but those two guys give us weapons on both sides of the floor.’’

Coincidentally, Hardaway wore No. 5 in his first stint with the Knicks — Lee’s number. But Hardaway decided to let Lee keep it. Lee also knew Hardaway was not going to be a threat to his playing time. The regime told Lee the plan was to start both of them — provided Carmelo Anthony was traded.

“They did a good job of communicating with me in the offseason,” Lee said. “I talked to Steve in the offseason. He said it would be fun. ‘We envision you two playing together.’ I knew what was going on. I reached out to Tim and I told him congrats. I told him if he wants ‘5,’ bring something to the table.”

Hardaway decided to keep the money, but he has brought something to the table.

“He felt it was a new start and he’d rock a ‘3,’ ” Lee said.

He’s rocking it well.