A civilian employee set a US Navy nuclear-powered submarine on fire, causing US$400 million (NZ$508m) in damage, because he was suffering from anxiety and wanted to get out of work early, Navy investigators said in a complaint.

Casey James Fury, 24, faces up to life in prison on two counts of arson for allegedly setting fire to the USS Miami while it was in dry dock on May 23 and setting a second fire outside the sub on June 16.

Fury was taking multiple medications for anxiety and depression, and he told investigators he set the fires so he could get out of work, according an affidavit filed in US District Court in Portland on Monday (local time).

Fury, who was working on the sub as a painter and sandblaster, initially denied starting the fires, but eventually acknowledged his involvement, the affidavit reads. He admitted to setting the May 23 fire while taking a polygraph test and being told by the examiner he wasn't being truthful.

Fury told Timothy Bailey, the polygraph examiner, that ''his anxiety started getting really bad'' so he grabbed his cigarettes and a lighter, walked up to a bunk room and set fire to some rags that were on the top bunk before returning to work.

Fury was scheduled to make his initial court appearance on Monday afternoon (local time).

Federal Public Defender David Beneman, who represents Fury, declined to comment.