The Virginia Democratic Party, reeling from a decade of defeats in statewide elections, today chose Portsmouth Mayor Richard J. Davis, a moderate business leader, to repair its fortunes as party chairman.

Davis, 57, edged 8th Congressional District chairman Raymond W. Colley of Fairfax County for the leadership post on the third ballot at a spirited meeting of the party's state central committee.

Davis received 87 votes to 75 for Colley. Seventh District chairman Jack M. Horn of Charlottesville was eliminated on the second ballot.

All three of the candidates were considered moderates in a party bitterly split for more than 10 years by a schism between liberal and conservative wings.

In a brief acceptance speech, Davis declared, "After 10 years, the war within this party is over."

Although ideological differences among the three contenders for the chairmanship were minor, Davis apparently won on the strength of a campaign that represented him as best able to restore the party's standing with many business contributors who have deserted the Democrats for Republicans during the past decade.

Davis, who has pledged to resign in 1980 if he cannot improve the party's election success, had the support of many of the party's black leaders and officeholders. A lawyer and businessman, Davis was attacked yesterday because of a campiagn donation that opponents said his wife made to Republican Gov. John N. Dalton in his 1977 race against Democrat Henry E. Howell. Davis countered that he was a Howell donor and that his wife was free to make her own donations as she pleased.

Davis was a law partner of former Democratic U.S. Sen. William B. Spong for 25 years. Spong was defeated by former Republican Sen. William L. Scott in the Democratic debacle of 1972, the year that Fitzpatrick and the liberal faction supporting him took over the party organization in Virginia.

The new chairman replaces state Sen. Joseph T. Fitzpatrick of Norfolk, once a leader of the liberal Democratic wing, who tried with limited success to mend the party schism during more than six years of troubled leadership.

Fitzpatrick managed to wipe out a party debt of about $200,000 but he was never able to match financial and organizational strengths of the increasingly powerful Virginia Republican Party.

He announced his resignation in November after Republican Sen. John W. Warner narrowly defeated Democratic candidate Andrew P. Miller in the U.S. Senate election. Virginia is the only state in the nation that has failed to elect a Democratic governor or senator in more than 10 years. Only one Democratic presidential candidate has carried Virginia since 1948.

Colley's loss was a disappointment to Northern Virginians who gave him nearly unanimous backing on all three ballots.

Davis entered the race for the chairmanship late, but his well-staged campaign quickly picked up endorsements from legislators and other officeholders who apparently were convinced he can move the party back into the state's moderate-conservative political mainstream.

Lt. Gov. Charles S. Robb of McLean, considered most likely to be the Democratic nominee for governor in 1981, remained neutral during the chairmanship race. Two of his top aides worked vigorously for Davis.

Howell, champion of the party's liberal faction during three unsuccessful bids for the governorship, aligned himself with Colley Miller spoke to the central committee yesterday, but said he was neutral on the choice of a chairman.

Davis promised to begin work immediately to rebuild the Democrats' financial support and to staff its state headquarters with an executive director, a position that has been budgeted but never filled for lack of funds.