A lock-in amplifier circuit has been designed and tested which serves as an automatic frequency control (AFC) for electron spin resonance (ESR) spectrometers employing solid-state microwave generators. Its implementation in a typical spectrometer is described and a detailed electronic schematic presented. Its performance is tested as a lock-in amplifier operating under open loop conditions, wherein operating with a 20-kHz reference, it yields an 81-dB improvement in signal to (9 kHz) noise ratio. This is consistent with expectations from computer simulations. When employed as an AFC in a typical X-band ESR system the capture and lock ranges are observed to be equivalent to those obtained from a commercial lock-in amplifier.