Ghana's former head of state, Ignatius K. Acheampong, was executed by a military firing squad early today after being convicted of squandering government funds

Gen. Acheampong, 47, was president of the West African nation for six years until he was deposed last July. He stood trial before a revolutionary court set up by a group of junior officers who seized power in a coup 12 days ago.

Another British-trained officer, Lt. Gen. E. K. Utuka, former commander of Ghana's border guards, was found guilty of the same charges and executed with Acheampong.

The lasted coup, led by Flight Lt. Jerry Rawlings, overthrew Acheampong's successor, Gen. Fred Akuffo. He is in custody and also may face trial.

Accra Raio said Acheampong and Utuka, 42, were convicted "on charges of using their positions to amass wealth while in office and recklessly dissipating state funds to the detriment of the country."

The executions were carried out at an Army firing range about four miles from the center of Accra. The same site was used for Ghana's last such execution, in May 1967, when two lieutenants were shot to death after an unsuccessful coup attempt.

Thousands of people watched on that occassion but today only a handful of reporters were allowed into the area. Civilians were kept away, and no relatives of either man were present.

Acheampong smiled and waved a white handkerchief to the reporters as he was driven off to his death.He and Utuka both had red hoods drawn over their heads before being shot.

Afterward the bodies were taken away for burial in a prison cemetery at Nsawam, north of Accra.

Shortly after the executions, Britain announced its formal recognition of Ghana's new military government. A Foreign Office spokesman in London refused to comment on the executions.

"It is a matter internal to Ghana," he said.

In such situations, the United States normally continues its diplomatic recognition of whatever government is in power, making no special decision with each change of government.

Acheampong and Utuka were shot two days before scheduled elections to return Ghana to civilian rule for the first time since 1972. The new military rulers have pledged the Ghana will return to civilian government as planned on Oct. 1.

On the eve of the executions, the ruling Revolutionary Council announced that cases against former officials accused of corruption were being heard by a special 15-member military tribunal. The council said those found guilty would be sentenced to death immediately.

But it was not known whether trials were continuing today or whether more executions were contemplated. A military spokesman said a statement would be issued later.

Acheampong was held in custody until last month, when he was released by the Akuffo government and banished to his home village of Iraboum, about 170 miles from the capital. At the same time he was stripped of all military rank.

As head of state, he presided over a period of unprecedented corruption and economic hardship that saw the once-prosperous West African state lose its influential role in regional affairs. By the time he was ousted, his government's maxim that "unity is strength" had become a joke. CAPTION: Picture, IGNATIUS K. ACHEAMPONG . . . ruled for six years