John W. Purdy, the senior Democrat on the Arlington County Board, said yesterday he will challenge William S. Burroughs Jr., the county's controversial prosecutor, in a June Democratic primary.

Burroughs, 40, said last week that he planned to seek a second four-year term as the commonwealth's attorney of Arlington.

Burroughs has been controversial in both legal and political circles in the county, largely as a result of his handling of the 1977 double murder of real estate agent Alan Foreman and his fiance Donna Shoemaker.

"I'm not seeking this job as a challenge to anybody else," said Purdy, whose announcement was a surprise to many Arlington Democrats. He said he will remain on the County Board, where he has served since 1972, while running against Burroughs.

"I've been interested in it (the prosecutor's job) for a long time," Purdy, who practices law in Fairfax County, said. "If I don't get this job, I'll probably be in the running for another County Board term in 1980."

Burroughs had no comment on Purdy's announcement.

During a budget hearing last year, Purdy, then County Board Chairman, was openly critical of Burroughs' $44,500-a-year salary. "There is no way the incumbent is worth that kind of money," Purdy said then.

After what Burroughs termed inadequate investigation by Arlington detectives, he personally conducted much of the 1977 murder investigation, causing a widely publicized and bitter rift between himself and police.

Complaints by police and others to Virginia Attorney General J. Marshall Coleman last year prompted a state police investigation of Burroughs' conduct in the case, and, some say, to the sudden resignation of Roy C. McLaren as Arlington police chief last August.

The state police investigation cleared Burroughs of misconduct allegations, Coleman said later.

Angered by the probe, Burroughs said later that he had used two Arlington sheriff's deputies to investigate those who investigated him. The prosecutor said he wanted to discover whether "the state's investigatior was political or not." Coleman is a Republican.

Last October, Richard Lee Earman, who was acquitted in 1977 of murder charges in the deaths of Foreman and Shoemaker, was reindicted by an Arlington grand jury on charges including conspiracy to murder. The case is scheduled for trial next month.