"Mr. Spaceship" by Philip K. Dick
The story is set in the distant future, where humanity is at war with "Yuks", an alien life form which does not use mechanical spaceships nor constructions but instead relies on life forms to power their technology. The war has been going on for a long time and humanity has not been able to come up with a solution against the life-form based ships and mines that the Yuks use. One day a team of researchers led by Philip Kramer decide to build a spaceship which is powered by a human brain and they find the ideal candidate in Kramer's old professor, a dying man who volunteers to donate his brain to the project.
The spaceship is built and on the first test run into outer space the team discovers that the professor made some changes to the ship, giving him—or rather, his brain—full control over the entire ship. Sensing trouble, the team flees the empty ship being piloted by the professor and evacuate into outer space. Later, the spaceship returns and kidnaps Kramer and his wife. On board the ship, the professor's brain informs them that they will be looking for a new planet to colonize to try and start a new and better world. The professor decides on this colonization because he sees no hope in humanity and what he feels it has become: a species which desires, above all else, war.
An excerpt from the Project Gutenberg copy regarding the living mines:
“Mine is very simple. These creatures are superior to any mechanical system, but only because they’re alive. Almost any other life-form could compete with them, any higher life-form. If the yuks can put out living mines to protect their planets, we ought to be able to harness some of our own life-forms in a similar way. Let’s make use of the same weapon ourselves.”
Found with a search for site:gutenberg.org mines brain spaceship