MILWAUKEE — Knicks combo guard Iman Shumpert returned from a sore hip Tuesday night against the Bucks, after missing all but 55 seconds of the previous two games, and hoped to return as a foul-free premier defender.

Shumpert, who started alongside J.R. Smith in a 3-guard alignment, has excelled in the triangle offense, entering the game averaging 12.4 points and leading the team in shooting percentage at 50.5 percent. He’s also averaging 3.2 assists. Those are nice numbers for a guy looking for a new contract in July when he becomes a free agent for the first time.

But the defensive stalwart out of Georgia Tech has not been as demonic on the other side of the ball, partly due to excessive fouling.

He’s fouled out twice after having been disqualified just three times total in his first three seasons. Entering Tuesday’s game, he was tied for the team lead with Carmelo Anthony in fouls (32) despite playing far fewer minutes.

“My biggest desire is to go out there and not foul,’’ Shumpert said after the shootaround at the Bradley Center. “We did a great job of not fouling against Denver [Sunday]. It resulted in a win for us. I just want to come and play my part and not foul.”

During the Knicks’ 117-113 loss to the Bucks, Shumpert did his part — on both ends of the floor. He continued to excel on offense, scoring 21 points and handing out eight assists, and on defense, he had three steals and committed a single foul.

Shumpert came into the season as the Knicks’ best perimeter defender but with major concerns about his offense, especially his ball-handling and long-range shooting. One theory is he’s expending so much energy on offense handling the ball in the triangle, he’s not as focused on defense.

But Shumpert said he was just being too aggressive on defense.

“It’s just wanting to get that steal and create another opportunity for the team,’’ Shumpert said. “I’ll reach in, get those two fouls early. By the end of the game, I don’t have any of those two, three fouls to spare. I need to keep my two, three fouls to spare without reaching.

“If I stop reaching, I’ll be just fine. Some of the time, those guys are pros, they’re going to get to the basket, and I got to bite my lip and trust my bigs to make plays at the rim.’’

In the preseason, Knicks coach Derek Fisher said Shumpert “gambled’’ too much on defense and he aimed to correct that issue. It still hasn’t been fixed, nor has the Knicks’ propensity to send teams to the foul line.

Fisher said he believes reducing fouls is a lot more important than being hurt with open 3-point shots. The Knicks rank 28th in the league in total fouls.

“We talk to all our guys about defending without fouling,’’ Fisher said. “If we can do a great job of sticking to defensive concepts and principles, it will take us out of bad defensive positions. As we improve in that area, we’ll make a big jump on the defensive end not giving up the free points. We have to focus on that area — not just Shump but all our guys. We’re fouling too much.’’

Last week, Fisher pointed the foul finger at Shumpert.

“His fouls are impacting us more than we would like, because we’re having to finish games with Shumpert on the bench,” Fisher said.

Shumpert deemed himself ready in the morning.

“Shootaround went well,’’ he said. “I was able to move and run. I’m happy with it. It just feels like I got kneed in the leg. As long as that hip pointer is gone, I’ll be able to move around.’’

Fisher went with a small alignment rather than put Smith back to the bench. Sunday, Smith excelled as a starter, scoring a season-high 28 points. Smith also played well late last season in a starting role, while Shumpert improved when he was moved to sixth man in mid-March.

“No guarantees just because a guy plays better as a starter he always starts,’’ Fisher said. “You have to monitor what’s best collectively.’’