Retired Navy Lt. Cmdr. Dwight James Adams, 58, who served in the Naval Medical Service Corps for 25 years, died of cancer Thursday at the Bethesda Naval Medical Center.

He was responsible for hospital administration and food service programs at naval hospitals in Newport, R.I., Philadelphia, and Chelsea, Mass., where he retired in 1965.

Cmdr. Adams had taught in food service programs at the Bethesda Naval Medical Center during 1956-59.

After his retirement from the Navy, Cmdr. Adams was assistant administrator of the New Rochelle Medical Center in New York. He returned to the Washington area in 1972 to manage the Bretton Woods Recreation Center in Seneca, Md. for the International Monetary Fund. He lived in Gaithersburg.

In 1975, he began work for several real estate firms and joined the Montgomery County Board of Realtors. He was honored by Long and Foster for attaining the $1 million sales mark in 1978.

Cmdr. Adams was born in East Moline, Ill. He was a graduate of Cornell University, where he majored in hotel administration. He was a member of the Cornell Society of Hotelmen and the Retired Officers Association.

He is survived by his wife, Bernadette, of Gaithersburg; two daughters, Patricia Ann Adams of Washington, and Jean Marie Apgar of North Eastham, Mass.; a son, Dwight James Jr., of Pittsfield, Maine; his mother, Jessie Adams, and a brother, Raymond, both of East Moline; another brother, Vernon of Tucson, Ariz., and two grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the American Cancer Society.