Background People with dementia (PwD) face unique challenges with medicines management, yet little is known about these challenges from the perspectives of primary healthcare professionals, particularly general practitioners (GPs) and community pharmacists. Few medicines management interventions have been developed which are aimed at community-dwelling PwD. This study sought to develop an intervention to improve medicines management for PwD in primary care using a theory-informed approach. Methods Semi-structured interviews were conducted with GPs (n = 15) and community pharmacists (n = 15) to explore participants' views and experiences of medicines management for PwD, and their perceptions of barriers and facilitators to successful medicines management for PwD. The 14-domain Theoretical Domains Framework was the underpinning theoretical guide, allowing key theoretical domains to be identified and mapped to behaviour change techniques (BCTs) which are considered the 'active ingredients' of an intervention. Draft interventions were developed to operationalise selected BCTs and were presented to GPs and community pharmacists during task groups. Final selection of an intervention for feasibility testing was guided by feedback provided during these task groups and through application of the APEASE (Affordability, Practicability, Effectiveness/cost-effectiveness, Acceptability, Side-effects/safety, Equity) criteria. Results Participants expressed a number of concerns about medicines management for PwD, particularly monitoring adherence to medication regimens and conducting medication review. Two draft interventions comprising selected BCTs ('Modelling or demonstration of behaviour'; 'Salience of consequences'; 'Health consequences'; 'Social and environmental consequences'; 'Action planning'; Social support or encouragement', 'Self-monitoring of behaviour') were developed, each targeting GPs and community pharmacists. Following the task groups and discussions within the research team, the community pharmacy-based intervention was selected for future feasibility testing. The intervention will target community pharmacists to conduct a medication review (incorporating an adherence check) with a PwD, delivered as an online video demonstrating key behaviours. The video will include feedback emphasising positive outcomes of performing the behaviours. Action planning and a quick reference guide will be used as complementary intervention components. Conclusions A community pharmacist-based intervention has been developed targeting medicines management for PwD in primary care using a systematic, theory-informed approach. Future work will determine the usability and acceptability of implementing this intervention in clinical practice.