Incorporating anatomical information obtained by magnetic resonance (MR) imaging has shown its promises to improve the positron emission tomography (PET) imaging quality. In this paper, we propose a novel maximum a posteriori (MAP) PET image reconstruction technique using a sparse prior whose dictionary is learned from the corresponding MR images. Specifically, a PET image is divided into three-dimensional overlapping patches which are expected to be sparsely represented over a redundant dictionary. With the assumption that the PET and MR images of a patient can be sparsified under a common dictionary, the dictionary is learned from the MR image to involve anatomical measurement in PET image reconstruction. The PET image and its sparse representation are updated alternately in the iterative reconstruction process. We evaluated the performance of the proposed method quantitatively, using a realistic simulation with the Brain Web database phantoms. Noticeable improvement on the noise versus bias tradeoff has been demonstrated in images reconstructed from the proposed method, compared to that from the conventional smoothness MAP method.