After graduating from Harvard Law School he worked in the office of Charles G. Loring.
During the United States Civil War, Rantoul joined the Republican Party.
In 1865, President Abraham Lincoln appointed Rantoul Collector of Customs the Salem and Beverly District.
That same year, Rantoul left the Republican Party in order to support Grover Cleveland for the Presidency.
Rantoul also served a legal counsel for a group of Salem citizens that fought for a community water supply.