For nonlinear stochastic systems, controlling low‐order moment indexes, such as mean and variance, may not effectively achieve actual control requirements since they do not reflect the complete statistical characteristics of random variables. Instead, the probability density function (PDF), which provides complete characterization of statistical properties, can be used to control each order moment more efficiently. Existing PDF shape control methods are mainly suited for nonlinear systems with polynomial forms, which leads to limitations in their applications. In this article, we propose a PDF shape control method using the Fokker–Planck–Kolmogorov (FPK) equation for nonlinear stochastic systems with arbitrary expression. In the proposed method, the exact stationary solution of the FPK equation is derived first. If the nonlinear function of the stochastic system is not polynomial, it is first converted into a polynomial form using the approximation method. The controller is then devised for PDF shape control, and the parameters of the controller are optimized to obtain the optimal controller. We conducted simulation experiments to validate the effectiveness of the proposed method. The results show that the proposed method can effectively control the PDF shape of the state response for nonlinear stochastic systems, regardless of whether the target PDF is unimodal, symmetric bimodal, or asymmetric bimodal. Compared with the Fourier transform method, the control effect of the proposed method is much better. The results suggest that the proposed method provides a scientific basis for wider applications of the PDF shape control method.