In this paper we investigate a chaotic convection in the presence of thermal modulation and internal heat generation. The viscoelastic fluid saturating porous medium, heated from below is considered. A modified Darcy's law is applied to the energy equation. Also the internal heat generation term is inserted in the energy equation. An autonomous system of fourth order differential equations have been deduced by using truncated Galerkin expansions. The asymptotic behavior can be stationary, periodic, or chaotic, depending on the values of the system parameters. It is found that, a better combination of the values of modulation parameters and scaled Rayleigh, internal Rayleigh numbers, provides a way for chaos. The modulation enhances or diminishes the behavior of chaotic nature in the system. Due to the high internal heat generation, there is a chance to devolve a new kind of stable or unstable points in the system. Finally, heat transfer results are presented in terms of the Nusselt number.