Richard W. Murphy, U.S. ambassador to Saudi Arabia, is returning to Washington to become assistant secretary of state for near eastern and south Asian affairs, official sources said last night.

Murphy, 54, will succeed Nicholas A. Veliotes, also 54 and a career Foreign Service officer, in the State Department's top Middle Eastern job.

Veliotes, the sources said, will be named ambassador to Egypt, succeeding Alfred L. Atherton, who previously held the post of assistant secretary of state dealing with the Middle East.

Murphy, who in 1974 became the first U.S. ambassador to Syria after the break in relations between the two countries stemming from the 1967 Middle East war, will come to his new post at a time when Syria presents the most important immediate roadblock to U.S. policies in the Mideast.

A month ago, Murphy flew to Saudi Arabia from home leave to join Secretary of State George P. Shultz in a visit to King Fahd in Jeddah and to accompany Shultz in other stops on his Mideast trip, including a visit to Syrian President Hafez Assad in Damascus.

Shultz was unable to convince Assad to begin negotiations leading to a withdrawal of Syrian troops from Lebanon. A new special U.S. Mideast envoy, Robert C. McFarlane, is on his first trip to the area with this mission at the top of his agenda.

Following his ambassadorial assignment in Syria, Murphy served as U.S. ambassador to the Philippines. He was hastily reassigned to Saudi Arabia in July, 1981, when then-Secretary of State Alexander M. Haig Jr. fired Ambassador Robert G. Neumann in a personal dispute.

Veliotes, a former U.S. ambassador to Jordan, has been in charge of the Middle East bureau of the State Department since the beginning of the Reagan administration. Although personally selected by Haig for the job, relations between the two cooled near the end of Haig's tenure, and there were persistent reports that Haig wanted to replace him.

Veliotes reportedly won the confidence of Shultz. However, the failure of King Hussein of Jordan to join U.S.-proposed negotiations with Israel on the Palestinian issue damaged the position of Veliotes, who had secretly visited Hussein before the U.S. proposal was announced last Sept. 1. Veliotes also was reported to be tired and ready to move on after more than two years in the grueling Mideast job.