A level set method based on the Bayesian risk is proposed for medical image segmentation. At first, the image segmentation is formulated as a classification of pixels. Then the Bayesian risk is formed by false-positive and false-negative fractions in a hypothesis test. Through minimizing the average risk of decision in favor of the hypotheses, the level set evolution functional is deduced for finding the boundaries of targets. To prevent the propagating curves from generating excessively irregular shapes and lots of small regions, curvature and gradient of edges in the image are integrated into the functional. Finally, the Euler-Lagrange formula is used to find the iterative level set equation from the derived functional. Comparing with other level-set methods, the proposed approach relies on the optimum decision of pixel classification; thus the approach has more reliability in theory and practice. Experiments show that the proposed approach can accurately extract the complicated shape of targets and is robust for various types of images including high-noisy and low-contrast images, CT, MRI, and ultrasound images; moreover, the algorithm is extendable for multiphase segmentation.