Mayor Jane M. Byrne, defeated in the Chicago Democratic mayoral primary by Rep. Harold Washington (D-Ill.), threw the race and the Democratic Party into new turmoil yesterday by unexpectedly announcing that she will seek reelection as a write-in candidate in the April 12 general election.

Her decision injects new controversy into a contest already rife with racial overtones as Washington seeks to become the first black mayor in Chicago history.

Washington said Byrne's announcement improves his chances of victory from 50 to 1 to 100 to 1, adding that he hoped Byrne would "reconsider and back out gracefully."

Byrne, who earlier had endorsed Washington, told a crowded news conference that her decision "has nothing to do with race. It has nothing to do with color. It has everything to do with my four years of hard work" as mayor.

She said she had concluded that neither Washington nor Republican Bernard E. Epton "represents the best interest of the city."

"A city is very, very fragile," she added. "To slip back an inch or two inches can be the end of a city. That's why I'm here."

The move, coming less than four weeks before the general election, was immediately condemned by party leaders as an act of betrayal. Democratic National Chairman Charles T. Manatt said Washington's "well-deserved victory in the Democratic primary cannot and will not be denied by this mischievous and hopeless write-in effort."

Cook County Democratic Chairman Edward Vrdolyak, formerly a staunch Byrne ally, reaffirmed party support for Washington and said he would not take part in any write-in effort. State Democratic Chairman Philip J. Rock issued a similar statement.

Washington, a two-term congressman, won the Feb. 22 primary over Byrne and Richard M. Daley, son of the late mayor, with overwhelming black voter support but little white support.

About 600,000 of Chicago's 1.6 million voters are black. In the primary, they turned out in unusually large numbers, and about 84 percent voted for Washington.

The legendary Chicago Democratic organization, however, has been reluctant to embrace Washington because of his announced plans to abolish City Hall patronage and restructure the police department.

Epton had hoped to pick up substantial Democratic support, and until yesterday had been given a better chance of being elected mayor than any Republican since 1931.

Epton said the write-in effort would damage his campaign; Washington said it would help his. "I think my chances increase every time we have strident, irrational opposition," he said after Byrne's announcement. Calling Byrne's move a "simple act of desperation," he said the mayor "still does not realize she is finished."

Alderman Vito Marzullo, dean of the City Council and a Byrne backer who this week endorsed Epton, agreed with Washington.

"It's dumb," he said, referring to the write-in campaign. "It won't work. She'll just help elect the other fellow Washington ."

No Chicago mayor has ever been elected in a write-in.

Byrne had endorsed Washington the day after the primary, saying, "I've been a Democrat all my life. He is the choice of the people and, yes, I will support him."

Byrne has been an unpredictable maverick ever since she upset Michael Bilandic, the Democratic machine candidate, to become mayor four years ago.

In 1979, she first endorsed President Carter's reelection, then abruptly threw her support behind Sen. Edward M. Kennedy (D-Mass.) for the Democratic presidential nomination.

Last week there were reports, which she denied, that high-ranking Republicans were talking to her about replacing Epton on the GOP ticket. Yesterday she said she decided to mount an "uphill battle" as a write-in candidate even though she had been advised "it's a great political risk."

"I'm willing to take that risk, even if it means the end of public life and public office," she said.

The first public reaction will come today when Byrne, Washington and Epton march down State Street in the St. Patrick's Day parade.