The population dynamics of a three-species ecological system with impulsive effect are investigated. Using the theories of impulsive equations and small-amplitude perturbation scales, the conditions for the system to be permanent when the number of predators released is less than some critical value can be obtained. Furthermore, because the predator in the system follows the predictions of optimal foraging theory, it follows that optimal foraging promotes species coexistence. In particular, the less beneficial prey can support the predator alone when the more beneficial prey goes extinct. Moreover, the influences of the impulsive effect and optimal foraging on inherent oscillations are studied using simulation, which reveals rich dynamic behaviors such as period-halving bifurcations, a chaotic band, a periodic window, and chaotic crises. In addition, the largest Lyapunov exponent and the power spectra of the strange attractor, which can help analyze the chaotic dynamic behavior of the model, are investigated. This information will be useful for studying the dynamic complexity of ecosystems.