We report on observations of the unusual neutron-star binary system FIRST J102347.6+003841 carried out using the XMM-Newton satellite. This system consists of a radio millisecond pulsar in an 0.198-day orbit with a ~0.2 solar-mass Roche-lobe-filling companion, and appears to have had an accretion disk in 2001. We observe a hard power-law spectrum (Gamma = 1.26(4)) with a possible thermal component, and orbital variability in X-ray flux and possibly hardness of the X-rays. We also detect probable pulsations at the pulsar period (single-trial significance ~4.5 sigma from an 11(2)% modulation), which would make this the first system in which both orbital and rotational X-ray pulsations are detected. We interpret the emission as a combination of X-rays from the pulsar itself and from a shock where material overflowing the companion meets the pulsar wind. The similarity of this X-ray emission to that seen from other millisecond pulsar binary systems, in particular 47 Tuc W (PSR J0024-7204W) and PSR J1740-5340, suggests that they may also undergo disk episodes similar to that seen in J1023 in 2001.