John G. Miles Jr., 39, an associate editor of the Bureau of National Affairs Inc., died of cancer Monday at the National Institutes of Health. He lived in Chevy Chase.

Mr. Miles joined BNA in 1967 as a legal editor and served as managing editor of two of its publications, The Criminal Law Reporter and The Law Officer's Bulletin. He was the principal author of two books on criminal law and had published several articles on constitutional law in professional journals.

In 1978, Mr. Miles was elected to BNA's board of directors and was named associate editor in charge of the legal services division a year later. He also was a consultant and guest lecturer in police training programs sponsored by the U.S. Park Police and other law enforcement agencies.

He was born in Minneapolis, and grew up in Eureka, Calif. He graduated from the University of California at Berkely with a degree in political science. He also was a graduate of the Catholic University School of Law. s

Mr. Miles had been president of the Student Bar Association at Catholic Student Bar Association at Catholic University and an editor of its law school student publication. He won first prize in the Grange Centennial Legal Essay Contest. He belonged to the D.C. Bar and the American Bar Association.

Survivors include his wife, Peggy and two sons, Jack and Matthew, all of Chevy Chase; his parents, John and Ruth Miles, five brothers, Michael, Joe, Tom Jim and Stephen, and a sister, Teresa, all of Eureka, and another sister, Mary Marinaccio of Reno, Nev.

The family suggests that expressions of sympathy be in the form of contributions to the Scholarship Fund of St. Anselm's Abbey School in Washington.