In this study, n-alkanoic acids (C7–COOH, C11–COOH, and C17–COOH) were immobilized onto strong basic anion-exchange membranes to form a stationary phase for hydrophobic solid phase extraction (SPE) application. The effects of feed surfactant amount, membrane counter ions, and surfactant chain length were investigated. Immobilized surfactant capacity increased with increasing feed surfactant amount, decreasing chain length, and the existence of OH − counter ions. Moreover, according to TGA analysis, a surfactant bi-layer was formed on the membrane surface. Following successful surfactant immobilization, batch adsorption experiments for doxepin (feed concentration of 0.2 mg/mL) were conducted. The adsorbed doxepin amount increased with the use of longer-chain surfactants, indicating that doxepin adsorption was dominated by hydrophobic interaction with the immobilized surfactant. An optimal desorption performance was achieved using 1 M NaCl in 50% ethanol for both C7–COOH and C11–COOH-immobilized membranes. In the SPE process with one C11–COOH-immobilized membrane, a concentration factor of 2 and complete doxepin recovery was achieved from 10 mL of a 0.1 ppm load.