Paxton, 30, had not pitched since May 3 because of inflammation in his left knee. He struck out seven hitters on 66 pitches and left with a 3-0 lead.
"I always have high expectations when we hand the ball to James Paxton," Yankees manager Aaron Boone told reporters. "[I] expect him to compete and make pitches and hopefully give us a chance to win a game."
Paxton is the first Yankees pitcher to throw at least four hitless innings since teammate Domingo Germán on May 6, 2018. Germán pitched six hitless innings in a 7-4 win over Cleveland that day.
The Yankees' no-hitter attempt ended on Wil Myers' sixth-inning single. New York has not thrown a no-hitter since David Cone's perfect game on July 18, 1999.
Paxton is 3-2 with a 2.81 ERA this season. He has 59 strikeouts in 41 2/3 innings.
New York moved to 36-19 with Wednesday's victory. The first-place Yankees have a 1 1/2 game lead over the Tampa Bay Rays in the AL East Division.