With one $5 billion transaction, the Howard Hughes Medical Institute will become "the largest private charitable industry in this country, and probably the world," Robert F. Greenhill, managing director of Morgan Stanley & Co., said yesterday.

By selling its principal asset, Hughes Aircraft Co., to General Motors Corp. for slightly more than $5 billion, the nonprofit institute will have assets far above the $3.6 billion of the Ford Foundation, currently the nation's largest foundation.

The institute sponsors medical research in the fields of genetics, immunology, metabolic control and neuroscience. It has not announced plans for spending its gigantic windfall, but could expand into a major force in American medical research and education.

HHMI is not a foundation, but rather a private, nonprofit corporation managed by a nine-member board of trustees. It has executive offices in Bethesda, administrative offices in Coconut Grove, Fla., and is incorporated in Delaware.

The institute can invest its assets to produce hundreds of millions of dollars in annual income and is restricted by its charter only to support basic science, particularly medical research.

However, its current tax status as a "medical research organization" limits its activities to performing medical research. HHMI's trustees are considering whether to reorganize the institute as a foundation, which would give it the flexibility to make grants and gifts, Donald S. Fredrickson, president and a trustee, said in an interview yesterday.

"We will develop plans for the use of this money and we will keep you informed," Fredrickson said at a press conference to announce the winning bidder, chosen with the help of Morgan Stanley. "We will more than double our current outlay. . . . We will be spending upwards from $200 million before too long."

The institute could become the private sector's counterpart to the federal National Institutes of Health, Fredrickson said in an interview last winter. Fredrickson spent 29 years -- including seven years as director -- at NIH, the nation's largest sponsor of medical research.

Fredrickson emphasized, however, that the Hughes institute is determined to complement, rather than duplicate, the efforts of NIH and other health sponsors. Additionally, the institute could not approach NIH's spending power, which will reach $5.2 billion in fiscal 1986.

Since its creation in 1953 as the sole stockholder of Hughes Tool Co., then the parent of Hughes Aircraft, the institute has quietly pumped millions of dollars into medical research, achieving public notice only through occasional clashes with the Internal Revenue Service or through legal fights for its control.

The HHMI was chartered to promote "human knowledge within the field of the basic sciences, principally medical research and medical education and the effective application thereof for the benefit of mankind."

Skeptics have suggested the institute was established for the tax benefit of Howard Hughes and the aircraft company he founded. Until his death, Hughes was the only trustee of the institute, which is now the sole owner of Hughes Aircraft, a defense contractor with 1984 sales of $4.9 billion.

For years the IRS has questioned the set-up because of the relatively small amounts of the company's profits that were channeled into medical research.

Last year, the aircraft company reportedly contributed $80 million of its profits to the institute, up from $51 million the year before. Until 1976, the year of Hughes' death, the institute's dividends from the aircraft company had peaked at only $4.2 million.

The board of trustees, established last year after six years of legal conflict over control of the institute, decided to maximize HHMI's wealth -- and quell IRS concerns -- by selling the aircraft company.

An IRS spokesman said the agency could not discuss the institute and the sale.

HHMI pursues its medical mission by creating and supporting laboratory units in affiliation with academic medical centers and their teaching hospitals.

"Ways have to be found to keep the bridges open between the basic and the clinical sciences," Fredrickson said of the laboratory units in his report to the trustees last year. The program seeks to strengthen the links between medical research and medical practice by placing investigators in clinical/teaching environments.

HHMI now runs 16 such units across the country, employing more than 200 scientists at universities including Yale, Harvard, Johns Hopkins, Stanford and Duke. Each year, the institute supports laboratory training for about 100 medical students and candidates for other degrees.

Hughes scientists have important advantages over colleagues with public funding. Whereas NIH makes one- to three-year funding awards for priority projects, HHMI is willing and able to support long-range programs of higher risk and cost.

HHMI and NIH have formed a partnership to create a new outlet for the institute's wealth: a research scholars program that will enable medical students to spend a year at NIH exploring the possibilities of laboratory research.

The program aims to combat the decline in the number of M.D.'s choosing careers in medical research. The program has selected its first class of 25 medical students to work alongside NIH's scientists on a campus with about 1,400 current research projects.

HHMI has committed $10 million to launch and support the program for the first five years. "Hughes Research Scholars" will reside and work in facilities that the institute is building in a renovated convent once inhabited by the cloistered Sisters of the Visitation. The convent is located on NIH's Bethesda grounds, and has been renamed the Mary Woodward Lasker Center for Health Research and Education.

With its new-found wealth, the institute could expand both the laboratory unit and research scholar programs, and still have plenty left over for any number of new projects.