Knowledge of diabetes mellitus (DM) management can improve adherence in medication-taking behavior. Counseling by pharmacists is believed to contribute to its better acquisition. Nevertheless, many counseling and reminder media are still currently developed. This study aimed to identify the effects of brief counseling-5A modification and a motivational reminder through short message services (SMS), designed with a religious approach, on medication-taking behavior and adherence among DM outpatients at Jetis 1 Community Health Center, Bantul, Yogyakarta, Indonesia. This quasi-experimental study employed a pretest-posttest control group design. Data were collected prospectively from May to August, 2018. There were 72 patients who met the inclusion criteria divided evenly into two groups, the treatment group and the control group. The data collected by interviews using questionnaires on medication-taking behavior and the medication adherence rating scale (MARS) and were statistically assessed using the Wilcoxon test. The results showed that brief counseling-5A, combined with religious motivational SMS, raised the stage of behavior change in DM patients. There were increases (Δ) in medication-taking behavior by 2.76±1.59 and patient compliance by 3.44±3.45. In conclusion, brief counseling-5A by pharmacists and motivational text reminders can improve the medication-taking behavior and compliance of DM patients with the therapy.