A novel staining agent, (5-(4-(diethylamino)benzylidene)− 1,3-dimethylpyrimidine-2,4,6(1 H,3 H,5 H)-trione) (DDB) was developed for the effective detection of environmentally harmful microplastics. DDB has competitive cost advantages, namely its facile synthesis and high yield, over Nile Red (NR), which is commonly used for microplastic staining. The unique photophysical properties of DDB, including emissive twisted intramolecular charge transfer (TICT) and aggregation-induced emission (AIE), were corroborated via spectroscopic investigations and density functional theory (DFT) calculations. Notably, DDB demonstrated superior selectivity for staining microplastics (polyethylene (PE), polyurethane (PU), polypropylene (PP), polyvinyl chloride (PVC), polystyrene (PS), and polyethylene terephthalate (PET)) over non-plastic materials in water. Furthermore, modulation of the solvent environment during the staining process yielded distinct fluorescence in both the green and red channels for specific types of plastic with the interplay between locally excited (LE) and TICT states. Treatment with 5% ethanol results in the selective staining of PE and PET with the emission of red fluorescence, whereas treatment with 30% ethanol facilitates the selective staining of PU, PVC, and PET with the emission of green fluorescence. Additionally, DDB could selectively stain microplastics in spiked soil and river water samples. Furthermore, a smartphone-based fluorescence microscope was developed at a cost below $100, validating the effective detection of microplastics stained with the newly synthesized DDB. The outcomes of this research demonstrate the potential of DDB as an economical and efficient agent for selective microplastic detection.