We have calculated the physical conditions throughout the merger Seyfert galaxy NGC 6240 by modelling the observed optical and infrared line ratios. We have found that the optical spectra are emitted by clouds photoionized by the power-law radiation flux from the active galactic nucleus/nuclei (AGN/AGNs), and heated mainly by the shock accompanying the propagation of the clouds outwards. The infrared line ratios are emitted from clouds ejected from a starburst which photoionizes the gas by the blackbody radiation flux corresponding to a stellar colour temperature of about 5 × 104 K. Both the flux from the AGN and the ionization parameters are low. The most characteristic physical parameters are the relatively high shock velocities (≥500 km s−1) and low pre-shock densities (∼40–60 cm−3) of the gas. The C/H, N/H, O/H relative abundances are higher than solar by a factor ≤1.5. We suggest that those relative abundances indicate trapping of H into H2 molecules rather than high metallicities. Adopting an initial grain radius of 1 μm, the dust temperatures calculated in the clouds reached by the power-law radiation and by the blackbody radiation are 81 and 68 K, respectively.