Retired Lt. Gen. John W. O'Neill, former vice commander of the U.S. Air Force Systems Command at Andrews Air Force Base, died Thursday of a massive heart attack in Miami, where he was vacationing with his family. He was 58.

Gen. O'Neill, born in Brookline, Mass., was commissioned a second lieutenant in the Army in 1940 after graduating from Boston University.

During World War II, after earning his pilot wings in the Army Air Corps, he was a B-29 pilot and squadron commander in the South Pacific, and participated in bombing raids on Tokyo.

In 1948, Gen. O'Neill served as operations officer and piloted the command aircraft for the first atomic bomb test over the Bikini Islands in the Pacific.

In 1951, he earned a master's degree from the University of Pittsburgh, and graduated from the War College of the Air University in 1954. During the 1950s and early 1960s, he held a variety of posts in Europe and Washington.

In 1964, he became commander of the Air Force Electronics Systems Division at Hanscom Field, Mass., leaving there in 1967 to assume command of the newly formed Space and Missile Systems Organization in Los Angeles.

Gen. O'Neill was appointed vice commander of the Air Force Systems Command in 1969, and held the post until his retirement in 1972.

After his retirement, he was appointed president of the Armed Forces Relief and Benefit Association, a Washington-based nonprofit insurance agency for military personnel.

In 1976, Gen. O'Neill was named flight Captain of the National Order of Daedalians, the philanthropic society of military aircraft pilots.

He is survived by his wife, Dorothea, and a son, Peter, of the home in Severna Park; three other sons, Dr. Brian A. O'Neill of Belleville, Ill., Stephen T., of Rapid City, S.D., and Michael J., of Charlotte N.C., and two daughters, Janice M. Guarino of Dayton, Ohio, and Kathleen Scott of Bethesda. A fourth son, Dennis, was killed in action in Vietnam in 1966.

Gen. O'Neill is also survived by his mother, Mary J. Sullivan, and sister, Mary Cullen, of Wellesley, Mass.; another sister, Barbara Chase, of Cohasset, Mass.; two brothers, Joseph Sullivan of Needham, Mass., and Thomas Sullivan of Wellesley, and six grandchildren.