William J. Barnhard, 62, a senior managing editor with the Bureau of National Affairs Inc., died of an aneurysm Thursday at Fauquier County Hospital in Warrenton, Va. He lived in nearby Midland.

He first joined the editorial staff of BNA, then a division of the U.S. News Publishing Co., in 1941. He left eight years later to set up his own law practice in Washington, specializing in international trade and imports.

Mr. Barnhard returned to BNA in 1969 as a member of its legal editorial staff. He served as managing editor of Corporate Reorganization Reporter, and then of Antitrust and Trade Regulation Report and U.S. Export Weekly.

He recently had completed the development for a new BNA publication, the U.S. Import Weekly.

Mr. Barnhard was born in New York City. He attended the University of Texas and graduated in 1938 from the Georgetown University School of Foreign Service. While earning a law degree at Georgetown University, he worked for the Kiplinger Washington Newsletter.

Mr. Barnhard was an Army veteran of World War II and the Korean conflict.

He is survived by his wife, the former Eleanor Estes, of the home; four children by a previous marriage, twin sons Dane, of Oxon Hill, and Dale, of Potomac, and twin sons, Peter, of Germantown, and Christopher, of Monrovia, Md.; three stepchildren, Janice Cook of Austin, Tex., Sherrill Mountjoy of Davidsonville Md., and Reginald Craig of Centreville, Va., and six grandchildren.