The target-decoy database search strategy is often applied to determine the global false-discovery rate (FDR) of peptide identifications in proteome research. However, the confidence of individual peptide identification is typically not determined. In this study, we introduced an approach for the calculation of posterior probability of individual peptide identification from the "local false-discovery rate" (local FDR), which is also determined based on a target-decoy database search. The peptide identification scores output by the database search algorithm were weighted by their discriminating power using a Shannon information entropy based strategy. Then the local FDR of a peptide identification was calculated based on the fraction of decoy identifications among its nearest neighbors within a small space defined by these weighted scores. It was demonstrated that the calculated probability matched the actual probability precisely, and it provided powerful discriminating performance between true positive and false positive identifications. Hence, the sensitivity for peptide identification as well as protein identification was significantly improved when the calculated probability was used to process different proteome data sets. As an instance based strategy, this algorithm provides a safe way for the posterior probability calculation and should work well for datasets with different characteristics.