Prosecutors said Alihuseyn Shaliyev, a former department head in the Ministry of Economic Development, slit his veins while in the prison's hospital, where he was recuperating from an operation earlier this week.
Vugar Aliyev, a spokesman for the Azerbaijani Prosecutor-General's Office, told RFE/RL that Shaliyev had left a letter addressed to his relatives in which he said "nobody is guilty of this death and that he apologizes for this act."
Shaliyev was one of a number of officials arrested ahead of last year's parliamentary elections on charges of planning to overthrow President Ilham Aliyev.
Pro-government parties won a landslide victory in the November election, which international observers said did not meet democratic standards.
RFE/RL Caucasus Report
SUBSCRIBE For weekly news and in-depth analysis on Armenia, Azerbaijan, Georgia, and Russia's North Caucasus by e-mail, subscribe to "RFE/RL Caucasus Report."