Honor Among Enemies (Honor Harrington Series, Book 6)
For Captain Honor Harrington, it's sometimes hard to know who the enemy really is. Despite political foes, professional jealousies, and the scandal which drove her into exile, she's been offered the chance to reclaim her career as an officer of the Royal Manticoran Navy. But there's a catch. She must assume command of a "squadron" of jury-rigged armed merchantmen with crew drawn from the dregs of her service and somehow stop the pirates who have taken advantage of the Havenite war to plunder the Star Kingdom's commerce. 

That would be hard enough, but some of the "pirates" aren't exactly what they seem... and neither are some of her "friends." For Honor has been carefully chosen for her mission - by two implacable and powerful enemies.

The way they see it, either she stops the raiders or the raiders kill her, and either way *they* win.
Science fiction, Honor Harrington (Fictitious character), Fiction, Women soldiers, Women soldiers in fiction
David Weber