Efficient error mitigation techniques demanding minimal resources is key to quantum information processing. We propose a protocol to mitigate quantum errors using detection-based quantum autoencoders. In our protocol, the quantum data is compressed into a latent subspace while leaving errors outside, the latter of which is then removed by a measurement. Compared to previously developed neural-network-based autoencoders, our protocol on one hand does not require extra qubits for data compression, and on the other hand can be more powerful as demonstrated in certain examples. Our detection-based quantum autoencoders are therefore particularly useful for near-term quantum devices in which controllable qubits are limited while noise reduction is important.