We propose a model for controlling and enhancing the entanglement between the two cavity fields and mirror with a hybrid optomechanical system consisting of \(\Lambda \) -type three-level \({ }^{85} \textrm{Rb}\) atomic ensembles driven by two externally modulated laser fields. When one (another) cavity mode is driven at the red (blue) mechanical sideband and both cavity modes are blue-detuned by the mechanical frequency to the respective atomic resonant transitions, the dynamic coupling control of the cavity field and mirror can be realized by periodically modulating the amplitudes of the two incident laser fields. Compared to the unmodulated case, the periodic modulation of the laser fields in a cavity optomechanical system embedded with a small number of atoms has the capability to enhance the entanglement between the two cavity fields and mirror. This scheme provides a new approach to the generation and control of entanglement in cavity optomechanical systems.