The bound state Bethe-Salpeter amplitude was expressed by Nakanishi in terms of a smooth weight function g. By using the generalized Stieltjes transform, we derive an integral equation for the Nakanishi function g for a bound state case. It has the standard form g= Vg, where V is a two-dimensional integral operator. The prescription for obtaining the kernel V starting with the kernel K of the Bethe-Salpeter equation is given.