A flexible method for subcarrier demultiplexing in radio-over-fiber (RoF) systems is proposed and experimentally demonstrated. The subcarrier demultiplexer is realized by a coefficient-switchable microwave photonic filter, which is based on biasing Mach–Zehnder modulator (MZM) at different transmission slopes. The 2.4GHz and 2.7GHz subcarrier signals both modulated with 100Mbps on-off keying (OOK) data are transmitted and demultiplexed in the RoF system. The experimental result shows that each of the two subcarriers can be individually selected out with the other one well depressed. The proposed subcarrier demultiplexing scheme is simple, feasible, cost-effective and has good potential applications in the multiplexed RoF systems.