The 24-year-old American, who is a contender for PGA Tour Rookie of the Year, finished fourth at last month's PGA Championship and fifth two weeks ago at the Tour Championship.
The Manchester-born golfer had returned a negative test last Thursday but tested positive after arriving in NY ahead of this week's tournament at Winged Foot Golf Club.
"Scheffler is asymptomatic and safe at home but has tested positive for COVID-19 and out of concern for everyone in the championship has withdrawn", the USGA said in a statement.
Horsfield has won twice on the European tour already this season, both at the Hero Open and the Celtic Classic.
Scheffler, an All-American at the University of Texas who has played in three US Opens and was the low amateur when he tied for 27th in 2017 at Erin Hills, is replaced in the field by Branden Grace, the first alternate as determined by the Official World Golf Ranking as of Augugst 23, 2020.
Koepka and Northern Ireland's Graeme McDowell previously pulled out of the Travelers Championship after their caddies tested positive for coronavirus.
Horsfield had qualified for the U.S. Open by virtue of his standing in a compilation of U.K. Swing events that the USGA used to set the 144-player field.
Johnson was voted the recipient of the tour's Jack Nicklaus Award, while Scottie Scheffler received the Arnold Palmer Award as the PGA Tour's Rookie of the Year.
Horsfield is the second golfer to test positive for the coronavirus ahead of the U.S. Open this week, joining Scottie Scheffler.
England's Sam Horsfield tees off during the Hero Open in Birmingham, England, on August 2, 2020.
He played in the final group with Dustin Johnson at the PGA Championship and tied for fourth.