  We study the effect of external companion on the orbital and spin evolution
of merging black-hole (BH) binaries. An sufficiently close by and inclined
companion can excite Lidov-Kozai (LK) eccentricity oscillations in the binary,
thereby shortening its merger time. During such LK-enhanced orbital decay, the
spin axis of the BH generally exhibits chaotic evolution, leading to a wide
range ($0^\circ$-$180^\circ$) of final spin-orbit misalignment angle from an
initially aligned configuration. For systems that do not experience
eccentricity excitation, only modest ($\lesssim 20^\circ$) spin-orbit
misalignment can be produced, and we derive an analytic expression for the
final misalignment using the principle of adiabatic invariance. The spin-orbit
misalignment directly impacts the gravitational waveform, and can be used to
constrain the formation scenarios of BH binaries and dynamical influences of
external companions.
