A molecularly imprinting polymer (MIP) was synthesized for Basic Blue 3 dye and applied to wastewater for the adsorption of a target template. The MIPs were synthesized by bulk polymerization using methacrylic acid (MAA) and ethylene glycol dimethacrylate (EGDMA). Basic Blue 3 dye (BB-3), 2,2′-azobisisobutyronitrile (AIBN) and methanol were used as a functional monomer, cross linker, template, initiator and porogenic solvent, respectively, while non-imprinting polymers (NIP) were synthesized by the same procedure but without template molecules. The contact time was 25 min for the adsorption of BB-3 dye from 10 mL of spiked solution using 25 mg polymer. The adsorption of dye (BB-3) on the MIP followed the pseudo-second order kinetic (k2 = 0.0079 mg·g−1·min−1), and it was according to the Langmuir isotherm, with maximum adsorption capacities of 78.13, 85.4 and 99.0 mg·g−1 of the MIP at 283 K, 298 K and 313 K, respectively and 7 mg·g−1 for the NIP. The negative values of ΔG° indicate that the removal of dye by the molecularly imprinting polymer and non-imprinting polymer is spontaneous, and the positive values of ΔH° and ΔS° indicate that the process is endothermic and occurred with the increase of randomness. The selectivity of the MIP for BB-3 dye was investigated in the presence of structurally similar as well as different dyes, but the MIP showed higher selectivity than the NIP. The imprinted polymer showed 96% rebinding capacity at 313 K towards the template, and the calculated imprinted factor and Kd value were 10.73 and 2.62, respectively. In this work, the MIP showed a greater potential of selectivity for the template from wastewater relative to the closely similar compounds.