In China, stroke is characterized by high incidence, recurrence, disability, economic burden, and mortality. Regular and effective medication therapy can reduce stroke recurrence. High medication literacy is vital for the success of tertiary prevention measures aimed at preventing recurrence and minimizing disability. A cross-sectional survey using a medication literacy questionnaire was conducted between January and May 2022 on 307 inpatients of a Class III Grade A hospital in Hefei, Anhui Province, China. The demographic and clinical data of the patients were obtained from medical records. The health literacy of the patients was moderate, with 36.8% exhibiting adequate medication literacy. Univariate analysis identified significant differences in the medication literacy of the patients, depending on education level, annual income, family history of stroke, number of health problems, age, daily medication times, and brain surgery history. Multiple regression analysis revealed that education level, annual income, family history of stroke, and number of health problems significantly influenced medication literacy. In patients with stroke who are older and have a low education level, more health problems, no history of surgery, or no family history of stroke or medication guidance, medication knowledge and attitude can be improved to enhance medication safety and guarantee tertiary-level prevention of stroke.