He first went to sea on board the sloop of war Erie in March 1832, which was followed by a tour of duty at Charlestown (Boston), Massachusetts. In August 1834, he again joined the sloop Erie on a long and eventful voyage which lasted for more than three years. He was promoted to first lieutenant on 12 September, 1836.
From September 1837 to April 1841, 1stLt Zeilin served at Charlestown, Massachusetts, and New York. In February 1842, he returned to sea duty, on board the Columbus, and during the cruise that followed spent several months on the Brazil station. Upon the conclusion of this tour of sea duty, and after again serving at important Marine Corps stations on the east coast of the United States from 1842 to 1845, he was transferred to duty aboard the frigate Congress of the U.S. Pacific Squadron.Between 1845 and 1848, 1st Lt Zeilin cruised on the Columbus and Congress.
During the Mexican-American War, he commanded the Marine detachment embarked in Congress, which ship was attached to Commodore Robert F. Stockton's force. He took part in the conquest of California (1846-1847) and was brevetted to the rank of major (two grades above his rank at the time) for gallantry during the action at the San Gabriel River crossing on January 9, 1847. Later, he took part in the capture of Los Angeles and in the Battle of La Mesa.
On 28 January, 1847, Zeilin was appointed Military Commandant of San Diego and served in that capacity until the completion of the conquests of California. In September 1847, he served with the forces that captured Guaymas and those that met the enemy at San Jose on the 30th. For the remainder of the war, Mazatlán was his center of activity, and he fought in several skirmishes with the Mexicans in that area. He was promoted to the regular rank of captain on 14 September, 1847. During the following few months, Capt Zeilin, with the Marines of the Pacific Squadron, participated in the capture of important ports in lower California and the west coast of Mexico, and served as Fleet Marine Officer of the Pacific Squadron.
After the close of the war with Mexico, he proceeded to Norfolk, Virginia, where he served for a time, thence to New York. He remained at New York until June 1852, when he was selected to accompany Commodore Perry as Fleet Marine Officer in the famous expedition to Japan — serving with the Marine detachment in Mississippi in which ship he cruised to Japan with Commodore Matthew C. Perry's expedition. With elaborate ceremonies, the Marines under command of Capt Zeilin took a prominent part. He was the second person to set foot on shore at the formal landing of the naval forces at Yokohama, Japan, on 14 July, 1853, and was one of those later accorded special honor for his part in the expedition that opened the doors of Japan to the outside world.
Upon his return from Japan, he was again stationed at Norfolk. This duty was followed by his being placed in command of the Marine Barracks, Navy Yard, Washington, D.C. After remaining for a time at Washington, he again went to sea, this time aboard the frigate Wabash, on the European Station, until the year 1859.
During the early part of the American Civil War, he was on garrison duty in command of Marine Barracks, first at Philadelphia and later at Washington, D.C. In July 1861, he was on detached duty with the Marine battalion at the Battle of Bull Run in which he was wounded. Five days later, he was appointed to the regular rank of major. On July 21, 1861, Zeilin commanded a company of Marines during the First Battle of Manassas and received a slight wound.
In 1863, Maj Zeilin was given command of the battalion of Marines sent to support the naval force whose mission was the capture of Charleston, South Carolina, but, because of illness, he returned after a few weeks of this duty to garrison duty at Marine Barracks, Portsmouth, New Hampshire. Later, he went to sea again, serving with the South Atlantic Blockading Squadron under Rear Admiral John Dahlgren.
In 1864, Zeilin assumed command of the Marine Barracks at Portsmouth, New Hampshire. On June 10, 1864, he was appointed Colonel Commandant of the Marine Corps in the rank of colonel. On 2 March, 1874, Zeilin became the Marine Corps' first general officer when he was promoted to brigadier general.
After the war, BGen Zeilin officially approved of the design of the "Eagle, Globe, and Anchor," as the emblem for the Marine Corps.
Brigadier General Zeilin retired from the Marine Corps on November 1, 1876 after serving over forty-five years as a Marine Corps officer. Four years later, on 18 November, 1880, he died in Washington, D.C. He is buried in Laurel Hill Cemetery, Philadelphia, Pennsylvania.