Ukraintsev started his career in civil service in 1660 as a "podyachy" (; "hypodiakonos" from Greek means "assistant servant") in the "Posolsky Prikaz" (Diplomacy Department). He served under the supervision of Afanasy Ordin-Nashchokin, which whom he would go on a diplomatic mission to Warsaw in 1662-1663. Ukraintsev took part in signing the Treaty of Andrusovo with Poland in 1667. In 1672-1673, he was sent as an envoy to Sweden, Denmark, and the Netherlands, where Ukraintsev conducted negotiations regarding these countries' participation in military campaigns against Turkey. When Artamon Matveev fell into disgrace in 1676, Ukraintsev unofficially took charge of the "Posolsky Prikaz". In 1677, he was sent to Warsaw as a second ambassador. In 1679, Ukraintsev met with Hetman Ivan Samoylovych to negotiate joint military action against the Turks. Ironically, he also participated in Samoylovych's deposition during the Crimean campaigns in 1687.