Then, for several years, he commanded merchant ships out of Boston, Massachusetts. When war between the United States and Great Britain broke out in 1812, Aylwin received an appointment as a lieutenant in the United States Navy and became sailing master in "Constitution". He received commendations for his gallantry during that frigate's engagement with "Guerriere" on 19 August 1812. In which he refused medical attention until everyone else on the ship had received it.