The Nizami Museum of Azerbaijan Literature occupies a fine early 20th-century building whose exterior facade is made photogenic with ogive arched niches set with statues of the nation’s literary greats.
The exhibitions within look at Azerbaijan's history through the prism of such writers, but there's a fair amount of overlap with the Historical museum. The latter has a more appealing interior so would be your first choice if you chose to visit just one.