A branch and bound algorithm is proposed for the two-dimensional protein foldingproblem in the HP lattice model. In this algorithm, the benefit of each possiblelocation of hydrophobic monomers is evaluated and only promising nodes are keptfor further branching at each level. The proposed algorithm is compared withother well-known methods for 10 benchmark sequences with lengths ranging from20 to 100 monomers. The results indicate that our method is a very efficient andpromising tool for the protein folding problem.