President Carter plans to nominate former representative Robert C. Krueger (D-Rex.) to be ambassador-at-large for U.S.-Mexican relations, it was learned yesterday.

Krueger, 43, who failed to unseat Sen. John G. Tower (R-Tex.) in a bitter campaign last year, will be based in Washington in the new post.

With U.S.-Mexican relations entering a crucial period of negotiating on such issues as gas and oil sales and immigration problems, Kruegar will be responsible for coordinating the work of eight State Department task forces.

Krueger, a two-term congressman and former Duke University professor, speaks Spanish and has been an outspoken advocate of Mexican-American civil rights. He is a bachelor who frequently dates Susan Clough, Carter's confidential secretary.

Before deciding on the Krueger nomination, Carter last month offered the position to Patrick J. Lucey, the controversial U.S. ambassador to Mexico. Lucey accepted, but after it was reported, President Jose Lopez Portillo of Mexico persuaded Carter to leave Lucey in Mexico, according to senior White House and State Department Sources.

Krueger had been considered a leading candidate to succeed Lucey in the post, and he actively campaigned for it.

The White House is expected to announce Krueger's nomination soon, Frank Moore, head of Carter's congressional liaison office, has informed members of the Texas delegation.

Before deciding on the nomination, Carter discussed the matter with Lucey, who will work closely with Krueger, State Department sources said.

Unlike Krueger, Lucey does not speak Spanish. And the former Wisconsin governor's service as ambassador, although praised by Carter and Secretary of State Cyrus R. Vance and some Mexican officials, has been criticized by some State Department career officers and U.S. business leaders in Mexico City.

Lucey will remain in Mexico for "the foreseeable future," according to Jody Powell, Whit House press secretary. Other sources said they expect Lucey to return to Washington by the end of the year, perhaps to assist in Carter's reelection campaign.

Krueger, who has a doctorate in Shakespearean literature from Oxford, taugh literature for 12 years at Duke University. In 1973, his final year there, he served as dean of the college of humanities and sciences. He returned that year to his hometown of New Braunfels, Tex., after the death of his father to take control of the family businesses.