President Reagan intends to sign historic legislation that would pay $1.2 billion to the West's Japanese-Americans who were uprooted from their homes and held in camps during World War II, according to administration and congressional sources.

Reagan's intentions, which would reverse a position taken by the administration in September, have been signaled by his top aides _ including outgoing chief of staff Howard H. Baker Jr. and his deputy, Kenneth M. Duberstein, who will replace Baker next Friday, the sources said.

"The issue now is not whether he's going to sign it," said one congressional source who has been personally assured by Duberstein and Baker that Reagan will approve the $1.2 billion legislation. "It's whether he's going to have a signing ceremony or not."

Said Grant Ujifusa, the co-editor of "The Almanac of American Politics," who is lobbying for the legislation on behalf of the Japanese American Citizens League: "It's all on track. . . . We're all set."

The legislation would pay each person who was detained at the internment camps $20,000. It also would formally apologize for an incorrect policy imposed in the hysteria of war.

In the six months following Japan's bombing of Pearl Harbor on Dec. 7, 1941, some 120,000 Japanese-Americans along the West Coast _ most of them in California _ were rounded into the camps. Many lost their homes, businesses and other personal possessions.

Japanese community leaders now estimate that about 60,000 of those who were detained are living and would be eligible to collect the $20,000.

But before Reagan can act, Senate and House negotiators must resolve differences between separate versions of the bill that passed each respective body during the past year. The negotiations are being led by Sen. John Glenn, D-Ohio, and Rep. Barney Frank, D-Mass. A consensus bill could emerge as early as this week.

According to those familiar with the negotiations, the compromise will call for the $1.2 billion to be allocated over 10 years, with the oldest survivors receiving their single payments of $20,000 first.

Rep. Norman Mineta, D-Calif., who himself was taken to internment camps as a boy, said the compromise also would condition payments on a survivor remaining alive until the day the bill is enacted, probably in January 1990. If a survivor of the camps dies after the bill is law, the person's child or parent would be eligible to collect the $20,000.

If Reagan signs the compensation bill into law, he will directly contradict a policy position of his own administration announced last September.