The Casimir effect is a fascinating phenomenon where quantum fluctuations of the electromagnetic field give rise to measurable forces between macroscopic systems. Here we propose that the Casimir effect can be used as a tool to detect changes in electronic structures. In particular, we focus here on the Lifshitz transition-a topological change in the Fermi surface-in a planar spin-orbit-coupled semiconductor in a magnetic field and calculate the Casimir force between the semiconductor and another probe system across the magnetic-field-tuned transition. We show that the Casimir force experiences a sharp kink at the topological transition and provide numerical estimates indicating that the effect is well within experimental reach. The simplest experimental realization of the proposed effect would involve a metal-coated sphere suspended from a microcantilever above a thin layer of InSb (or another semiconductor with a large g factor).