This paper presents a common-path (CP) swept-source optical coherence tomography (SSOCT) system based on a special endoscopic probe design with an in-line internal reflection as the reference and a two-axis electrothermal microelectromechanical system mirror for image scanning. The rear surface of a gradient reflective index (GRIN) lens inside the probe is set as the reference reflection plane. The length of the GRIN lens is optimized to eliminate the artifacts in SSOCT images successfully. Doppler OCT is also demonstrated based on the CP endoscopic probe. The diameter of the probe is only 2.5 mm, so it can be easily inserted into the biopsy channel of traditional endoscopes to access human internal organs for in vivo diagnoses.