Retired Navy Capt. Richard J. Selman, 64, a retired appellate judge of the Navy, died Thursday at Commonwealth Doctors Hospital after a heart attack.

He had served as appellate judge from 1972 until his retirement in 1973. Since then he had been in the private practice of law with offices at his home in Fairfax.

Capt. Selman was born in Blakesburg, Iowa. He graduated from Parsons College in Fairfield, Iowa, and earned a degree from Drake University Law School in Des Moines. Later he received a master's degree in international affairs from George Washington University.

He served at sea with the Navy in the Atlantic and the Pacific during World War II. After the war, he was on the staffs of the commandants of the 14th Naval District at Pearl Harbor and the 12th Naval District at San Francisco.

From 1951 to 1956, Capt. Selman was an appellate government counsel, director of the litigation division and special assistant to the Navy judge advocate general here.

He then became staff legal officer to the commander of the 6th Fleet head-quartered in France. He was executive officer at the Naval Justice School in Newport R.I., and legal officer of the 6th Naval District in Charleston, S.C. before returning here in 1964 as assistant judge advocate general for military law and officer and charge of Navy appellate review activity.

Capt. Selman's decorations included the Legion of Merit.

He was a member of the American and Federal Bar associations and the Judge Advocates Association.

He is survived by his wife, the former Sophia E. (Libby) Sizemore, of Fairfax; a son, Richard J. Jr., of South Harpswell, Maine; two daughters. Janet Markoe of Angels Camp, Calif., and Nancy Diane, of Pensacola, Fla.; his mother, Mrs. Ralph J. Selman of Fairfax; a brother, Thomas A., of Littleton, Calif., and three grandchildren.