Many protein-ligand docking problems attempt to predict the bound conformations of two interacting molecules. Consequently, the docking problem requires a powerful search technique to explore the translations, orientations, and each torsion until an ideal site has been found. Therefore, protein-ligand docking can be formulated as a parameter optimization problem. However, highly flexible ligands have a lot of torsions. Therefore, the optimization problem of highly flexible docking would become more difficult due to the increment of parameter number and interactions among these parameters. We proposed a novel method SODOCK based on particle swarm optimization (PSO) for solving flexible protein-ligand docking problems. PSO has significant effect on the optimization of parameters with strong interactions. A commonly used efficient local search is incorporated into SODOCK to improve the efficiency and robustness of PSO. SODOCK is efficient for both types of ligands with small and large numbers of torsions. It is shown by computer simulation that SODOCK performs well in obtaining accurate conformations, compared with some of state-of-the-art methods. Moreover, it is also shown that SODOCK is superior to AutoDock using the same energy function in AutoDock 3.05 in terms of convergence speed, robustness, and docking energy, especially for highly flexible docking problems.