This paper presents a efficient resource allocation algorithm for the multiuser orthogonal frequency division multiplexing(OFDM) system based on the network utility maximization framework. In the wireless context, the optimization problem is nonconvex, which makes the problem difficult to be solved by using the classical optimization theory. Particle swarm optimization(PSO) algorithm is applied to the design of the optimization problem. To improve the performance of standard PSO algorithm and avoid trapping to local excellent result, a chaos PSO(CPSO) algorithm is presented, which embeds logistic chaos into the PSO algorithm. The proposed algorithm can solve the nonconvex optimization problem efficiently and outforms other algorithms.