From 1676 he was attached to Tsarevich Peter stolnik and subsequently supreme postelnichim. When the Princess Sophia had shown a special commitment to Peter, who was accompanied during the flight from the musketeers design in the Trinity Lavra (in 1689), and has since enjoyed a constant trust Peter. He accompanied the king in his first voyage to foreign lands and with him worked in shipyards in Saardam. In 1709 at the Poltava field king congratulated Golovkin, which is already to 1706 headed the embassy of the order, state chancellor. In this rank Golovkin took an active part in dealing with foreign powers, accompanied the king in his travels and campaigns, among other things, the Prut. By establishing and colleagues (1717) Golovkin he was named president of Collegium of Foreign Affairs. When Catherine I, Golovkin was appointed (1726) a member of the Supreme Privy Council. The Empress gave him to maintain his spiritual testament, which appointed a successor to the throne of Peter II, and its one of the guardians of a minor emperor. After the death of Peter II of, Golovkin gave the fire an act of the State, which, in the case of a childless death of the young Emperor, the throne was provided for further descendants of Peter I, and spoke in favor of Anna Ivanovna. Personal enemy of Prince Dolgoruky, Golovkin acted against the intentions of the supreme. When Anna Ivanovna was appointed to prisutstvovaniyu in the Senate, and in 1731 a member of the Cabinet. Count of the Roman Empire from 1707, Golovkin in 1710 he received the title of count Russia. A skillful courtier, who managed to maintain its value in four reign, Golovkin owned by a Stone Island in St. Petersburg, many houses and estates, but was, on the information reported by extremely stingy.