Particle swarm optimisation (PSO), which is a kind of typical swarm intelligent algorithm, simulates the process of birds searching for food to solve optimisation problems. In this paper, a Chinese folk composition model based on PSO algorithm is put forward. The concept of multi-melody space is constructed for the traditional pentatonic music creation. The multi-melody space PSO algorithm called MSPA searches the solution in melody space. Experimental results show that the model is feasible and effective in the process of Chinese folk music composition.