NBA legend Julius Erving is about to lose his 6,700 sq. ft. house in Utah ... because it's about to go into foreclosure.
The house -- which the former basketball star has been trying to sell for over a year -- went into pre-foreclosure last month ... after Dr. J defaulted on his loan.
Erving tells TMZ, the house is "substantially underwater" -- meaning he owes more than it's worth.
The house -- located in St. George, Utah -- is worth $2.23 million, according to Foreclosures.com.