The Lindblad master equation describes the evolution of a large variety of open quantum systems. An important property of some open quantum systems is the existence of decoherence-free subspaces. A quantum state from a decoherence-free subspace will evolve unitarily. However, there is no procedural and optimal method for constructing a decoherence-free subspace. In this paper, we develop tools for constructing decoherence-free stabilizer codes for open quantum systems governed by the Lindblad master equation. This is done by pursuing an extension of the stabilizer formalism beyond the celebrated group structure of Pauli error operators. We then show how to utilize decoherence-free stabilizer codes in quantum metrology in order to attain the Heisenberg limit scaling with low computational complexity.