The Department of Energy discovered to its surprise and possible embarrassment yesterday that Mobil Oil Corp. has tape recorded telephone conversations with department officials.

Energy Department lawyers learned indirectly of Mobil's recordings through discovery proceedings in a Texas lawsuit between two oil companies. The department officials who took part in the recorded conversations said they had not been informed that the talks were being taped.

The telephone conversations occurred last December when Mobil officials were constantly talking to department officials about crude oil regulations that Mobil hoped the department would issue.

The transcript of those conversations could prove embarrassing because, when the department issued a list of "all communications" relating to the crude oil regulations, it failed to mention the telephone conversations that Mobil recorded and transcribed.

Accordingly, a litigant in the Texas case has suggested that the department has concealed its contacts with Mobil relating to the regulations.

The incident arose from a dispute between Mobil, a huge firm engaged in all phases of oil production and marketing, and Basin Inc., a small Midland, Tex., concern which acts a middleman between crude oil producers and refiners.

In November 1977 Basin convinced some Texas oil producers to sell their crude oil to Basin rather than to Mobil. Mobil first tried to dissuade the producers from selling to Basin. Failing that, Mobil sought a ruling from the Energy Department that would prohibit Basin from competing for its crude.

Two weeks after Mobil asked for it, the department issued a ruling that stopped Basin from competing.

Basin sued to overturn that ruling. As part of its suit, Basin asked both Mobil and the Energy Department to reveal all their communications concerning the ruling.

In response, Mobil revealed that it had secretly tape recorded two conversations about the ruling with department officials. It gave Basin transcripts of the conversations, which took place the day before the ruling favorable to Mobil was issued.

In its separate response to Basin, the department did not mention either of the recorded conversations.

Accordingly, said Thomas Kemp, an Energy Department lawyer on the case, the department was "quite surprised" to learn that its conversations had been recorded. Kemp said he did not know why the department had failed to reveal the communications with Mobil.

Department lawyers said Mobil's secret transcript is not a violation of law. "But it's not the kind of thing you expect a firm as big as Mobil to be involved in," said Peter Ludke, an associate general counsel. He said DOE would probably alert all "relevant" officials to be on their toes in the future when taking with anyone outside the government.

Leo Hoffman, a Dallas attorney representing Mobil in the case, said he did not know if the recording is a standard practice at Mobil. No one was available for comment last night at Mobil's headquarters in New York.