The Justice Department, taking a controversial stand in the energy field, has urged Congress and the President to bar producers of oil, natural gas and coal from owning the pipelines that transport the fuels.

This would be "the clean solution" to the problems of anticompetitive behavior that do or can arise from such ownership, the department said in a report on antitrust issues relating to the production and transportation of Alaskan natural gas. The recommendation would have its most drastic impact of the major oil companies. In joint ventures with each other, they own most of the principal pipelines - the transportation mode within the United States for the bulk of petroleum products.

The 82-page report was sent to Capitol Hill and President Carter Thursday by Deputy Attorney General Peter F. Flaherty. A footnote said that Attorney General Griffin B. Bell, whose former law firm has oil-industry clients, "did not participate . . . due to conflict-to-interest considerations."

The department until now has not taken a strong, explicit stand on pipeline divestiture, although its Antitrust Division for about a year has opposed producer ownership.

The report is bad news for the Alaskan Arctic Gas Pipeline Co., which proposes to build a buried overland natural-gas pipeline from Prudhoe Bay to the Mackenzie Delta in the Northwest Territories, where it would pick up additional supplies, and then down through Canada to the U.S. border.

Arctic Gas's rivals for a licenses are the Alcan Pipeline Co., which also proposes to build an overland line, and Elpaso Alaska, which wants to carry North Slope Gas to the California coast with a combination of pipeline and liquified natural gas tankers. On May 1. the Federal Power Commission said it prefers an overland route but left the choice between Artic Gas and Alcan to President Carter.

The sponsors of Artic Gas include four natural-gas producers: Imperial Oil, Ltd., which is 70 per cent owned by Exxon: Gulf of Canada, Ltd; Shell Canada, Ltd., and Union Gas Ltd. Together, they control 36 per cent of gas supplies from all sources, compared with 4.3 per cent for Alcan's backers and 8.2 per cent for El Paso's.

The FPC favors producer participation in joint pipeline ventures in order to attract their financial resources. Disagreeing, the Justice Department said that if Arctic Gas is chosen, and if Imperial and the other three producers will supply "significant amounts" of gas to the pipeline, the producers should be prohibited from having an ownership interest in the pipeline or from participating "in any form."

The prohibition would help "to ensure that no anticompetitive effects flow from the selection or operation of an Alaskan natural gas transportation system," the report said.

One department fear is that producer-owners of a pipeline could assign some or all of its profits to production operations, thereby circumventing regulation of pipeline rates.

In addition, the report said, "it would be in the interest" of producer-owners not to expand the pipeline's capacity in order to deny access to future Alaskan gas producers.

The department drew a contrast with pipeline owners who are not producers and who, "motivated by pipeline profits only," naturally seek to expand and welcome new business.