The generation of photons from the vacuum by means of the movement of a mirror is known as the dynamical Casimir effect (DCE). In general, this phenomenon is effectively described by a field with time-dependent boundary conditions. Alternatively, we introduce a microscopic model of the DCE capable of capturing the essential features of the effect with no time-dependent boundary conditions. Besides the field, such a model comprises a subsystem representing the mirror's internal structure. In this work, we study one of the most straightforward mirror systems: a qubit moving in a cavity and coupled to one of the bosonic modes. We find that under certain conditions on the qubit's movement that do not depend on its physical properties, a large number of photons may be generated without changing the qubit state, as should be expected for a microscopic model of the mirror.