Council member Willie J. Hardy (D-Ward 7) yesterday ended weeks of speculation by announcing that she will leave the council at the end of her term to open a private consulting firm.

Hardy is quitting after 5 1/2 years on the council. She has been the 7th Ward's only elected representative since the first council race there in 1974. She becomes the first council member not to seek reelection in the brief history of the body.

By bowing out, Hardy has thrown wide open the race for the 7th Ward's seat. This election is expected to be the most hotly contested this year. Already, three well-known candidates are seeking Hardy's job: congressional aide Johnny Barnes, real estate man H. R. Crawford, and school board employe Emily Washington.

Hardy said yesterday she already has decided which candidate to endorse as her successor, and she will make that decision known at a press conference later this week. Several sources said that Hardy would throw her support to Barnes.

Hardy said that she would campaign actively for whichever candidates she endorses, contending that "I don't give up an office without staying actively involved in the process."

Barnes, Crawford and Washington all are from the southern half of Ward 7, the new enclave of black affluence in Southeast Washington. The area is south of Fort Dupont Park and includes Branch Avenue and posh Westover Drive. The battle in the 7th Ward will be for that crucial vote north of the park of the low-income families and public housing dwellers who have supported Hardy overwhelmingly in past races.

Any other candidates will face considerable opposition in that area from Crawford, who is a manager of low- and moderate-income apartment buildings in that section of the city. Crawford is a proven vote getter in Ward 7, winning 4,903 votes in the ward in his losing race for an at-large council seat in 1978.

Although Barnes reportedly will enjoy Hardy's support, another contender for it is Washington, a former Ballou High School teacher who now works for school board president Calvin Lockridge. Washington won an impressive 1,804 votes in her losing school board race last year. The winner of that race, Nathaniel Bush, got 2,180.

Hardy became the target of considerable criticism recently when it was learned that a largely probusiness workmen's compensation bill she sponsored had been written by the Metropolitan Washington Board of Trade. The bill eventually passed, but Hardy came under fire from organized labor and some residents of her ward.

Hardy said the consulting firm she will head will contract primarily with the federal government to examine urban policy programs.