  Using high-resolution optical spectroscopy we determine the chemical
abundance of the secondary star in the binary millisecond pulsar PSR
J1023+0038. We measure a metallicity of [Fe/H] = 0.48 +/- 0.04 which is higher
than the Solar value and in general find that the element abundances are
different compared to the secondary stars in X-ray binaries and stars in the
solar neighbourhood of similar Fe content. Our results suggest that the pulsar
was formed in a supernova explosion. We find that supernova models, where
matter that has been processed in the supernova is captured by the secondary
star leading to abundance anomalies, qualitatively agree with the observations.
We measure Li abundance of A(Li) = 3.66 +/- 0.20, which is anomalously high
compared to the Li abundance of stars with the same effective temperature,
irrespective of the age of the system. Furthermore, the Li abundance in PSR
J1023+0038 is higher than the Cosmic value and what is observed in young
Population I stars and so provides unambiguous evidence for fresh Li
production. The most likely explanation is the interaction of high energy
gamma-rays or relativistic protons from the pulsar wind or intrabinary shock
with the CNO nuclei in the secondary star's atmosphere via spallation which
leads to substantial Li enrichment in the secondary star's atmosphere.
