MCI Communications Inc. moved squarely into international data communications yesterday by purchasing WUI Inc., a subsidiary of Xerox Corp., in the most significant acquisition of MCI's brief history.

The $185 million cash purchase by MCI, the leading long-distance telephone competitor of American Telephone & Telegraph Co., must be approved by the boards of the two companies and by the Federal Communications Commission.

"It's a natural fit," said MCI Chairman William McGowan. "Both companies have the same customer base and technology."

MCI recently had announced plans to build a relatively modest $35 million digital data network as an effort to expand its business base, and the company's management often has expressed interest in entering international communications fields.

In 1974 the company made its first major acquisition, a Nebraska telephone company, for $50 million. But MCI, which faced virtual bankruptcy as recently as 1976, is now in its best financial position since it was incorporated in its current form in 1968 and has been looking toward expansion projects.

WUI was divested from Western Union Telegraph Co. in 1963 under government order and was an independent, publicly held corporation until it was acquired by Xerox in 1979.

The company reported a profit of $18.5 million last year, and about 80 percent of WUI's 1980 revenues of $159.5 million came from the firm's largest subsidiary, Western Union International Inc., an international carrier serving subscribers on networks linking more than 100 countries. The firm's primary businesses are the telex, cablegram and private-leased-channel fields.

WUI now has about 23 percent of that market, third in the industry behind International Telephone and Telegraph Co.'s 34 percent and RCA Corp.'s 33 percent. In addition, the company owns Airsignal International Inc., a radio paging firm, and WUI-Tas Inc., a telephone answering service that operates in 47 cities.

MCI business has been booming in the last three years since it was given final federal authorization to provide virtually all types of long-distance telephone service. The company has more than 500,000 subscribers and has reported sales of $201 million for the first half of its current fiscal year compared with $234 million for the entire previous year.

The company has more than $150 million in cash in the bank and has a credit line of $200 million from a group of banks. McGowan said he expects that the money for the purchase will come solely from cash in company accounts.

The sale of WUI by Xerox is apparently part of a general refocusing of the firm's business.