In this review, we explore the evolving role of endoscopic ultrasound (EUS) in diagnosing and managing pancretobiliary malignancies. For solid pancreatic lesions, techniques like fine-needle biopsy (FNB), contrast-enhanced EUS (CE-EUS), and macroscopic on-site evaluation (MOSE) improve sample quality and diagnostic accuracy. In cystic pancreatic lesions, fine-needle aspiration (FNA), molecular testing, and confocal laser endomicroscopy (nCLE) aid in distinguishing benign from malignant cysts. For cholangiocarcinoma, EUS guided sampling is more accurate than CT in assessing distal lesions and lymph node metastases, while combining EUS with magnetic resonance cholangiography (MRC) enhances diagnostic sensitivity. In gallbladder cancer, EUS surpasses CT and MRI in detecting lymphadenopathy and staging tumors. EUS-FNB (Fine needle biopsy) improves biopsy accuracy, especially for unresectable cases. These advancements highlight EUS as a critical tool for early cancer detection, staging, and tissue acquisition. Beyond diagnosis, EUS plays a pivotal therapeutic role in managing complications such as malignant biliary obstruction and gastric outlet obstruction, offering minimally invasive alternatives like EUS-guided biliary drainage and gastroenterostomy with high clinical success and improved patient outcomes.