Correction Appended

H. A. R. (Kim) Philby, the double agent whose betrayal of his country and his social class indelibly marked British politics, has died in Moscow, officials in London said yesterday. He was 76 years old.

The officials said they learned of the death from the Soviet Embassy in London, but that no date or cause of death was given.

Mr. Philby fled to the Soviet Union in 1963, when his involvement in a Soviet spy ring was about to be revealed. Twelve years earlier, in 1951, Mr. Philby's warning had allowed two fellow spies, Guy Burgess and Donald Maclean, to flee to Moscow just before British counterintelligence was to interrogate them.

Thus Mr. Philby, who worked for British intelligence for 30 years and became one of its leading agents, came to be known as the ''third man.'' It was not until 1979 that the long-suspected ''fourth man,'' Anthony Blunt, Surveyor of the Queen's Pictures, was publicly revealed to have recruited the other three to the cause of Soviet Communism while they were Cambridge undergraduates in the 1930's.

Mr. Burgess and especially Mr. Maclean, who served in high posts in the British Embassy in Washington during and after World War II, provided the Soviet Union a wealth of detail on American and British policy at the height of the cold war.

But Mr. Philby's treachery was the most serious. He rose to very high rank in the British Secret Intelligence Service, known as M.I.6, and some thought he might become its chief; he ran its entire counterespionage operation and set up the section that spied on the Soviet Union. After his defection in 1965, the Russians awarded him the Red Banner of Honor for his services to the K.G.B.; Mr. Philby later received the privileges of a K.G.B. general. In 1968, he published his memoirs, ''My Secret War.''

In January of this year, Mr. Philby was interviewed by a British journalist, Phillip Knightley, for articles that were published recently in The Sunday Times of London. Asked if, despite all the betrayals, he would do it all again, Mr. Philby responded, ''Absolutely.'' He said he missed little in England except some friends, Colman's mustard and Lea & Perrins Worcestershire sauce. He said he had found peace and a happy fourth marriage, to a Soviet woman named Rufa. Cause of Death Not Indicated

Mr. Philby also said he suffered from an irregular heartbeat, and had been hospitalized for it. There was no indication yesterday of the cause of death.

The damage Mr. Philby did to British intelligence remains a subject of debate, limited by strict British secrecy laws. But his betrayal and that of his colleagues poisoned relations between British and American intelligence services for many years, with residues that last until today.

And the magnitude of their betrayal - of colleagues, class and country -became a kind of metaphor for the diffuse loyalties of the British Establishment that not only inspired a generation of spy fiction, most notably that of John le Carre, but also fed into the middle-class counterreaction in British Conservative politics exemplified by the current Prime Minister, Margaret Thatcher, who maintains a mistrust for both the Foreign Office and career intelligence officers.

Harold Adrian Russell Philby, who was described by friends of the early 1940's as an immensely handsome and charming man who drank too much, stuttered badly and had an eye for pretty women, was born on New Year's Day, 1912, in Ambala, India. Son of Arab Scholar

His father, Harry St. John Bridger Philby, was a famous British figure of good family and colonial aspirations: an author, desert explorer, Arab scholar and friend of the only other Arabist of the time who would be more famous, T. E. Lawrence. In 1912, the senior Philby was a civil servant in the Indian Government; within a decade, he had been interior minister of Mesopotamia (Iraq), an adviser to Winston Churchill and chief British representative in Trans-Jordan; later he became a close adviser to the Saudi king, Ibn Saud, and the explorer of the desert vastness then known as the ''Empty Quarter of Arabia.'' In 1930, he resigned from the British Foreign Service and became a Moslem and took the name of Hajj Abdullah.

The younger Philby was known as Kim, after the hero of Rudyard Kipling's novel of that name, a young boy who serves his country as a spy. The young Mr. Philby had a brilliant record at Westminster School, one of Britain's finest public schools, and at Trinity College, Cambridge. There he became treasurer of the University Socialist Society.

The true timing and venue of Mr. Philby's recruitment by Soviet intelligence is unclear. He maintained that he was recruited not at Cambridge but in 1934, after a visit to Vienna and his first marriage, to Litzi Kohlman, an Austrian Communist. That marriage ended in divorce in 1938. Justified His Argument

In ''My Secret War,'' Mr. Philby justified his espionage with the argument that the Western democracies were too weak and corrupt to put up a struggle against the Germany of Adolf Hitler.