Casey James Fury, 24, pleaded guilty to two counts of arson on and around the USS Miami on May 23 and June 16.
In a Portland courtroom Thursday morning, Fury admitted to setting the fires that placed the lives of people on and around the submarine in jeopardy.
At least five firefighters were injured in the May 23 fire.
Fury also pleaded guilty to setting a second fire in the dry dock area below the Miami on June 16, which was quickly put out. No one was injured in that fire.
The first arson charge carries a maximum sentence of life in prison. The second arson charge carries a maximum sentence of 25 years in prison.
No sentencing date has been scheduled.