Andrew P. Miller, the defeated Democratic candidate for the Senate from Virginia, is leaving his Richmond law firm to become a partner in the Washington firm of Dickstein, Shapiro & Morin.

David I. Shapiro, a partner in the 25-year-old firm, located at 2101 L. St. NW, said Miller, who was defeated by John W.Warner in the Senate race, would join the firm "the first of the year."

"He's going to be a full-time practitioner" in the firm, which has 50 lawyers and offices in New York and Boston also.

Miller, 46, who was born in Fairfax, plans "to move in due course to Norhtern Virginia," said F. Elmore Butler, managing partner of Mays, Valentine, Davenport & Moore, the Richmond fimr Miller is leaving.

Miller, reached by telephone late last night at his home in Richmond, declined to comment.

A graduate of the University of Virginia law school, Miller joined the Richmond firm about 1 1/2 years ago after ending his term as Virginia attorney genral.

"I guess Andy has decided that (the move to the Washington firm) offers an interesting challenge," Butler said last night.

"The people at our law firm in Richmond wish him great success," Butler said in a telephone interview.

"We've known Mr Miller for something like 10 years," Shapiro said last night. "We invited him to practice with us."

Miller, who had made a request for a new tally of the close Senate election, formally conceded defeat only two weeks ago after being confronted with costly court-ordered procedures that would govern any recount.

The decision came Dec. 17, hours after an order by a three-judge state court formally established recount procedures that could have cost him about $70,000 if he remained the loser after the new count.

That was twice the amount he had raised to cover the costs of a new tally in the election in which he was edged out by 4,721 votes out of 1.2 million cast.

Before becoming attorney general Miller had been a partner in the firm of Penn, Stuart & Miller, in Abingdon from 1963 to 1969.