He joined the navy in 1931, and was commissioned as an ensign in 1936. In 1944, was promoted to lieutenant; in 1949, to captain and in 1955, to commander. By 1972 he was Chief of Naval Shipyards. On December 12, 1972, President Salvador Allende named him Minister of Public Works as part of his "military cabinet".
Following the coup, he was reappointed as Minister of Foreign Affairs until 1974. As Chancellor, he attended the general assembly of the UN in New York, to defend the 1973 Chilean coup d'état. In February 1974 he met Henry Kissinger in México city to ask for US support. Due to the extremely bad image of the military regime immediately after the coup, he was replaced in June 1974, by Admiral Patricio Carvajal.
On July 30, 1974 Huerta was named Ambassador and Permanent Representative of Chile to the UN. He held this position until May 16, 1977, when he was replaced by Sergio Diez. On June 2 of the same year, he retired from the navy. On September 14, 1977 he became the President (Rector) of the Universidad Técnica Federico Santa María (Federico Santa María University), where he remained until May 17, 1984 when he resigned due to health problems. He also was a member of the board of the Compañía de Acero del Pacífico (CAP).
Admiral Huerta died in 1997, as results of a cardiac embolism.