We study an infinite-degree-of-freedom Hamiltonian system representing a mathematical model for an undamped, buckled beam. Using recent results by Melnikov-type techniques for two or more degrees of freedom Hamiltonian systems, we show that very complicated behavior occurs in this system: there exist orbits transversely homoclinic to periodic orbits, and orbits transversely homoclinic and heteroclinic to invariant tori consisting of quasiperiodic orbits. This leads to the nonintegrability of the system in appropriate meanings. The existence of orbits transversely homoclinic to periodic orbits also immediately yields chaotic dynamics by the Smale–Birkhoff homoclinic theorem. Moreover, the orbits transversely heteroclinic to invariant tori construct transition chains and pairs of heteroclinic cycles with different itineraries, so that transitions between small neighborhoods of invariant tori, which is similar to Arnold diffusion, and chaotic dynamics generated by a mechanism different from the Smale–Birkhoff homoclinic theorem can occur.