Kim Dae Jung. South Korea's principal opposition leader, was released from confinement today and promptly resumed criticism of the government that had jailed him for dissent 2 1/2 years ago.

Kim called the government a "dictatorial system," asked for the end of President Park Chung Hee's emergency decree and said he would continue his criticism even if it means returning to prison.

In an interview seven hours after his release, Kim said he still is not sure how much freedom the government will permit him.

"But anyhow, it is clear that I will devote myself to the people and to the restoration of democracy in this country at all costs," he said. "That is my duty for my people."

He called on the government to lift the mergency decree that bans criticism of the government-the one under which he was arrested in 1976-and urged release of all other political prisoners. His "final goal," he said, is to "restore democracy" in South Korea.

His commentsm in a written statement and in the interview, amounted to a new test of the Park government, which in the past has arrested people for less direct criticism. He is aware he could be returned to confinement for making the comments.

"I know that well and I am ready," he said.

While Kim relaxed with friends, his old rival, President Park, was delivering his inaugural address in a downtown auditorium . Park did not memtion the broad amnesty which freed Kim but promised to work for a political system which would uphold "disciplined liberties." He pledged greater efforts to build democratic institutions "through which individual citizens will participate with creativity and devotion in the development of the nation."

Kim, 53, was released in the early morning hours while the streets of Seoul were almost empty because of a curfew that begins at midnight. His release was part of a sweeping amnesty announced last week to coincide with Park's inauguration today for a new six-year term. The amnesty decree suspended jail terms for Kim and 105 other political prisoners, about half of whom are students arrested in demonstrations.

Kim looked well and at ease as he relaxed in the sitting room of his home, crowded with relatives, friends and political associates. During the interview, he smiled, joked with friends about his former guards, and puffed calmly on a pipe.

He gained weight during his confinement and said he feels "fairly well," despite pains in his joints. He suffers from an ailment similar to arthritis and moves with difficulty. For the past year, he has been confined to a heavily guarded room in Seoul Natioal University Hospital.

Kim and 17 other persons were arrested in March 1976 for issuing a manifesto critical of the government and calling for restoration of democracy. All the others had been released before today.

In the 1971 election, Kim ran a strong contest against Park, winning more than 45 percent of the vote as candidate of the New Democratic Party, and then became a principal spokesman for religious and political dissidents during the first severe government crackdowns.

In 1973, he was abducted from a Tokyo hotel by persons still unidentified and forcibly returned to Seoul, where he was placed under house arrest until the 1976 incident that brought a five-year prison term. It is believed that the Korean Central Intelligence Agency took part in the kidnaping, but the government has never admitted responsibility. After making initial protests about the abduction, the Japanese government dropped the matter.

For the past year, the government has taken a softer line on dissent, tolerating statements and demonstrations that would have brought long prison terms before, and reports of systematic torture of prisoners have almost ended. The amnesty decree taking effect today was the most dramatic gesture of toleration. An unknown number of political prisioners are still in jail.

Kim told friends today he was released at 1.55 a.m. and driven to his home in a government automobile although he had asked permission to be driven away by friends.

As he emerged from the hospital grounds, about 200 people lined up as a kind of escort. "I was surprised," Kim joked this morning. "They might have thought I was the Six Million Dollar Man."

He said he does not know how much freedom the government will allow him and said his specific plans for political opposition are not yet clear.

'''If I were to be allowed to go to [political] meetings, I would, but I don't believe that the government will permit that for me," he said.

In a statement released on his arrival at home, Kim thanked friends in the United States for their support and then renewed his antigovernment criticism.

"I firmly beieve that the longer the present dictatorial system continues, the more serious the ruin we may be forced to meet in the near future," he said.

"It is no doubt only when our people enjoy democratic freedom that they will be encouraged to secure this country voluntarily against the North Korean communist threat even at the risk of their lives."

Kim also indicated some dissatisfaction with President Carter's human rights policy. He said he had hoped "that it would be more effective expectations of people under suppressive regimes in the world. We Koreans never want to see our country become another Vietnam or a Nicaragua or an Iran where democracy has been strangled by the dictators."

In the interview, however, Kim said, "I admire and respect Mr. Carter and his policy," but said the president should make more "detailed plans" to enforece that policy. He said the system in South Korea is partly the result of an American policy to support dictatorial governments for the sake of combating communism. He referred specifically to testimony he said had been given by former secretary of state Henry Kissinger, quoting Kissinger as saying that "security is first and democracy is second in Korea."

He said the South Koreans' resist to communism in part will depend on how much personal freedom they enjoy in their own country.

"In this sense, if we don't enjoy freedom, our people will lose loyalty to the nation and their anticommunist consciousness will be diminished."