Flag in Exile
Hounded into retirement and disgrace by political enemies, cut to the heart by the murder of the man she loved, and bereft of confidence in herself and her abilities, Captain Honor Harrington has retreated to the planet Grayson to take up her role as Steadholder while she tries to heal her bitter wounds.

But the People's Republic of Haven is rising from defeat to threaten Grayson anew, and the newborn Grayson Navy needs her experience desperately. It's a call Honor cannot refuse, yet even as she once more accepts the duty whose challenges she fears she can no longer meet, powerful men who hate and fear the changes she's brought to their world are determined to reverse them. They have a plan... and for it to succeed, Honor Harrington must die.

Two irresistible forces are rushing together to crush Grayson between them, and only one woman - uncertain of her capabilities, weary unto death, and marked for murder - stands between her adopted planet and its devastation.
Space warfare, Mandatory Retirement, Life on other planets, Women spacechip captains, Space Opera
David Weber