Rayleigh Brillouin optical time domain analysis (BOTDA) uses the backscattered Rayleigh light generated in the fiber as the probe light, which has a lower detection light intensity compared to the BOTDA technique. As a result, its temperature-sensing technology suffers from a low signal-to-noise ratio (SNR) and severe sensing unreliability due to the influence of the low probe signal and high noise level. The pulse coding and LMD denoising method are applied to enhance the performance of the Brillouin frequency shift detection and temperature measurement. In this study, the mechanism of Rayleigh BOTDA based on a few-mode fiber (FMF) is investigated, the principles of the Golay code and local mean decomposition (LMD) algorithm are analyzed, and the experimental setup of the Rayleigh BOTDA system using an FMF is constructed to analyze the performance of the sensing system. Compared with a single pulse of 50 ns, the 32-bit Golay coding with a pulse width of 10 ns improves the spatial resolution to 1 m. Further enhanced by the LMD algorithm, the SNR and temperature measurement accuracy are increased by 5.5 dB and 1.05 °C, respectively. Finally, a spatial resolution of 1.12 m and a temperature measurement accuracy of 2.85 °C are achieved using a two-mode fiber with a length of 1 km.