Conjugated microporous polymers (CMPs), in which rigid building blocks form robust networks, are usually synthesized as insoluble and unprocessable powders. We developed a methodology using electropolymerization for the synthesis of thin CMP films. The thickness of these films is synthetically controllable, ranging from nanometers to micrometers, and they are obtained on substrates or as freestanding films. The CMP films combine a number of striking physical properties, including high porosity, extended π conjugation, facilitated exciton delocalization, and high-rate electron transfer. We explored the CMP films as versatile platforms for highly sensitive and label-free chemo- and biosensing of electron-rich and electron-poor arenes, metal ions, dopamine, and hypochloroic acid, featuring rapid response, excellent selectivity, and robust reusability.