In his first public interview since he narrowly lost the Virginia Senate race, Democrat Andrew P. Miller blamed poor organization in his own state party as the major factor in his defeat.

"If we'd have had the staff capabilities that the Republicans had, I'd have won," Miller said during a recent interview in his comfortable office at Dickstein, Shapiro and Morin, the Washington law firm he joined Jan. 1.

Vowing to remain active inVirginia politics, Miller also declined to rule out the chance that he might again run for office, although he rejected speculation that he might run within the next four years.

In the meantime, Miller said, he will campaign on behalf of other Democrats and he warned that the party's toughest job will be to tighten its organization before the 1981 gubernatorial race.

Looking relaxed and fit, Miller, 46, chatted easily about the political campaign that some Virginia Dmocrats said would be his last if he lost.

Earlier, he moved confidently through a throng of diners at a downtown Washington restaurant near his office, shaking the hands of wellwishers who stopped him to say hello.It seemed almost as if Miller, not Republican John W. Warner, had won. "I voted for you, Mr. Miller," a bartender rushed over to announce. Miller grinned and grabbed the bartender's outstretched hand, an indication that two months of isolation following the November election has failed to dim his political drive.

Later, in his office at the law firm where Watergate figure Charles E. Coson once worked and Miller now practices corporate law, the former two-term Virginia attorney general gave his views on the race he lost by only about 4,000 votes.

A Miller sampler:

Warner's controversial remark during a television interview that he tried to slow intergration effort s in the Navy while Navy secretary actually won Warner more votes among hard core conservatives than it cost him elsewhere.

Richard G. Obenshain, the first Republican Senate candidate, whom Warner replaced when Obsenshain was killed in an August plane crash, would have been easier for Miller to beat.

A Republican mailing in the last two weeks of the campaign that tried to link Miller with former Lt. Gov. Henry E. Howell, a controversial populist, was a crucial factor in the race.

"I'm confident the [integration] remark overall was a plus for him," Miller said. "It's unfortunate, but I think it's true." Miller said the remark probably helped Warner in the state's more conservative areas, such as the 3rd District, which includes Rechmond.

Simulataneously, Miller said, Warner encroached on Democratic votes in areas such as the Tidewater because his platform was more "centrist" than Obenshain's extreme conservatism. "All things considered, I think I would have done better aginst Dick," Miller said.

"The deciding factor in the race in my view was the direct mail campaign, particularly in the last few weeks," Miller said. The direct mail program, which included letters from Gov. John Dalton and former Gov. Mills E. Godwin, emanated from a computerized mailing list the Republican organization has bulit over the last several years, and is another indication, Miller said, of the GOP's organizational superiority in Virginia.

Miller said his own staff was never able to catch up with the Rupublicans. "Some of the people you hire perform better than others," he said.

Miller praised the choice of Portsmouth Mayor Richard Davis as the new state Democratic party chairman. "He's got an enormous job to do, and he's not going to do it over-night," Miller said.