Japan's Mazda Motor Corp. plans to take over a former Ford Motor Co. facility near Detroit to build up to 250,000 subcompact cars annually, several domestic auto industry sources said yesterday.

That means Mazda would join three other Japanese auto makers who are rolling out cars and trucks on American soil.

It also means a major vote of confidence for the long-struggling state of Michigan and the even more embattled city of Detroit, the capital of the nation's resurgent auto industry.

And, according to some analysts, it means that Japan's major auto makers are trying to get around import quotas by building more of their products in the United States. Those quotas have limited the shipment of Japanese-made passenger cars, vans and station wagons to this country since April 1981.

Mazda officials yesterday declined comment on reports that the company will build small cars in Flat Rock, a town of 8,000 people south of Detroit. But a Mazda spokesman said that his company will hold a press conference today in Detroit to make an "announcement of major significance to the greater Detroit area and to the nation in general." Michigan Gov. James J. Blanchard and Flat Rock Mayor Ted Anders will attend the news conference, state government officials said yesterday.

Based on information gathered from sources yesterday, Mazda will announce that:

*The now-shuttered Ford castings complex at Flat Rock, Mich., near Detroit, will be remodeled and retooled to build subcompact cars based on Mazda's front-wheel-drive, four-cylinder GLC. It could not be determined yesterday if the car would be the GLC itself, or a version of it.

*Mazda officials, though concerned about generally higher labor costs in the Michigan area, decided to build their car there because of the area's considerable and readily available pool of skilled labor and engineering talent. Also, according to sources, Mazda officials were impressed by the state's efforts to encourage investments in programs designed to develop new manufacturing technologies.

*Although Ford owns 25 percent of Mazda, the Japanese company decided on its own to start building cars in the United States. Mazda's manufacturing facilities will operate independently of Ford in this country, sources said.

The Ford complex that Mazda is expected to take over was built in March 1971 to make metal castings, including components for large V-8 passenger car engines. But Ford closed the facility in January 1982, after a series of energy crises cut consumer demand for the fuel-hungry V-8s.

The Flat Rock complex has nearly 3 million square feet of space and is located on 500 acres. Ford officials yesterday would neither confirm nor deny reports that Mazda has agreed to purchase the site.

A team of Mazda engineers visited Flat Rock in February 1983. But Mazda also looked at sites in the Southeast and in Iowa, Nebraska, Kansas and Oklahoma.

Recent reports were that Mazda seriously was considering setting up shop in South Carolina to take advantage of relatively lower labor costs. But Mazda, particularly through its rotary engine, has built its reputation on engineering expertise and innovation. Michigan offered a "better environment" for those aspects of Mazda's program, one source said. In addition, Mazda chose Michigan because it had the lowest utility costs among the possible sites, sources said.

Mazda is Japan's fourth-largest car company, based on 1983 new-vehicle registrations of 244,535 Mazda cars in that country, according to figures provided by Japan Automobile Manufacturer's Association Inc.

Mazda will join Honda Motor Co. Ltd., Nissan Motor Co. Ltd. and Toyota Motor Corp. in producing cars in the United States.

Honda makes Honda Accord sedans in Marysville, Ohio, for East Coast distribution. Nissan assembles subcompact pickup trucks and subcompact Nissan Sentra passenger cars in Smyrna, Tenn. Toyota and General Motors Corp., through a joint venture company called New United Motor Manufacturing Inc., will start producing subcompact Nova passenger cars in Fremont, Calif., on Dec. 4.