The Pistons (41-41) finished in eighth place in the Eastern Conference, and they will face the top-seeded Milwaukee Bucks in the first round of the playoffs.
Detroit needed a road win on the final night of the season to qualify for the playoffs for the first time since 2016.
"We're not where we want to be, but we're not where we were," first-year head coach Dwane Casey said after the Pistons' victory.
"We knew what was at stake," Detroit's Andre Drummond said after scoring 20 points and grabbing 18 rebounds in the win. "We knew that [the Knicks] were coming in to try to ruin our season that we worked so hard for."
Other Eastern Conference playoff matchups decided on the final night of the season:
Brooklyn will face the third-seeded Philadelphia 76ers in the first round of the playoffs.
The Magic secured the seventh seed, and they will face the second-seeded Toronto Raptors in the first round.
With Griffin out with a sore left knee, Detroit leaned on Luke Kennard against New York in the season finale. Kennard had 27 points on 9-for-14 shooting off the Pistons' bench. Reggie Jackson had 21 points and seven assists.
Kemba's 43 not enough as Hornets fall to Magic
Kemba Walker scores 43 points, but the Hornets fall 122-114 to the Magic.
Griffin has been the focal point of the Detroit offense, averaging 24.5 points, 7.5 rebounds and 5.4 assists per game this season.
Casey said that Griffin's lack of mobility was what kept him out of Wednesday's win. He was unsure if Griffin would be available for the series opener against Milwaukee, though Jackson said he expected Griffin to play.
"I think these few days off will help, and we'll just see where he is at that time," Casey said of Griffin.
Detroit's win leaves Charlotte short of a playoff spot in a summer in which Hornets star point guard Kemba Walker will test free agency.
Charlotte coach James Borrego summed up the season succinctly.
"We were one game from the playoffs,'' Borrego said after a loss that had little significance after Detroit's win against the Knicks. "Literally, one game away from the playoffs. Where we are as an organization, we are in a healthy place.''
The big question for the Hornets is whether Walker, who had 43 points against Orlando, will return. Walker said he had no idea.
Borrego indicated he wanted Walker back.
"I love that kid,'' Borrego said. "He inspires me. I love coaching him, and I look forward to coaching him for many years to come.''
ESPN's David Newton contributed to this report.