While optical analysis spectroscopy offers operational ease and low cost, it suffers from limitations regarding sensitivity when it comes to analyzing analytes at low concentrations. On the other hand, surface-enhanced Raman spectroscopy (SERS) offers high sensitivity but low selectivity in complex matrices. In this study, we have effectively addressed these challenges by integrating multiphase electroextraction (MPEE) as a sample preparation technique with these two spectroscopic methods for determining methylene blue (MB) dye in tap water samples. A Box-Behnken design was utilized for optimizing electroextraction parameters such as extraction time, pH, and acetonitrile percentage in the donor phase. After optimization, optical absorption spectroscopy results in a linear analytical curve within the range of 30 to 375 mg L-1 of MB, with method validation demonstrating high precision (relative standard deviation between 3.0 and 9.9%), recovery (99-105%), and detection and quantification limits of 1.3 and 4.0 μg L-1, respectively. On the other hand, using SERS, it was possible to detect MB in concentrations as low as 0.05 μg L-1. The extremely low concentrations of MB detected (in the range of a few ppb and ppt) and the acceptable validation performance parameters obtained highlight the potential of MPEE to enhance the applicability of spectroscopic techniques in routine analyses, especially when dealing with complex and challenging samples.