Many hot Jupiters are observed to be misaligned with respect to the rotation axis of the star (as measured through the Rossiter-McLaughlin effect) and some (about 25%) even appear to be in retrograde orbits. We show that the presence of an additional, moderately inclined and eccentric massive planet in the system can naturally explain close, inclined, eccentric, and even retrograde orbits. We have derived a complete and accurate treatment of the secular dynamics including both the key octupole-order effects and tidal friction. The flow of angular momentum from the inner orbit to the orbit of the perturber can lead to both high eccentricities and inclinations, and even flip the inner orbit. In our treatment the component of the inner orbit's angular momentum perpendicular to the stellar equatorial plane can change sign; a brief excursion to very high eccentricity during the chaotic evolution of the inner orbit can then lead to rapid tidal capture, forming a retrograde hot Jupiter. Previous treatments of the secular dynamics focusing on stellar-mass perturbers would not allow for such an outcome, since in that limit the component of the inner orbit's angular momentum perpendicular to the stellar equatorial plane is strictly conserved. Thus, the inclination of the planet's orbit could not change from prograde to retrograde.