A microscopic theory is presented for the photoacoustic effect induced in solids by x-ray absorption. The photoacoustic effect results from the thermalization of the excited Auger electrons and photoelectrons. We explain the dependence of the photoacoustic signal $S$ on photon energy and the proportionality to the x-ray absorption coefficient in agreement with recent experiments on Cu. Results are presented for the dependence of $S$ on photon energy, sample thickness, and the electronic structure of the absorbing solid.