Distance measure is the key issue in case-based reasoning(CBR), which influences the accuracy of case retrieval directly. For distance measure, a learning distance measure based on particle swarm optimization is proposed. The application range of CBR is extended by introducing leaning distance measure into CBR technology for the first time, which makes CBR technology have reasonable method to deal with the cases with correlative attributes. Finally, the simulation is conducted with real data and UCI data. The result shows that, compared with the other methods, this distance measure improves the accuracy of case retrieval.