Antimicrobial resistance (AMR) poses a major threat to global health. Understanding how antimicrobials are used on dairy farms and stakeholder beliefs relating to their use is essential to ensure responsible antimicrobial usage (AMU) to tackle the emergence of AMR. This study explored Scottish dairy farmers’ knowledge about the meaning of AMR and antimicrobial activity, behaviour and practices related to farm AMU and attitudes towards AMR mitigation. An online survey was designed based on the findings of two focus groups and was completed by 61 respondents (7.3% of the total population of Scottish dairy farmers). Knowledge of antimicrobials and AMR was variable, and almost half of the participants believed that antimicrobials could have anti-inflammatory or analgesic activity. Veterinarians’ opinions and advice about AMU were ranked significantly more important than other social referents or advisors. The majority of farmers (90%) reported having implemented practices to reduce reliance on antimicrobials (e.g., selective dry cow therapy, AMU treatment protocols) and having reduced farm AMU over recent years. Feeding waste milk to calves is still widespread, being reported by up to 30% of respondents. The main factors described to hinder responsible farm AMU were limited facilities (e.g., lack of isolation pens for sick animals) and knowledge of appropriate AMU recommendations, followed by time and financial constraints. Most farmers (89%) agreed that it is important to reduce AMU on dairy farms, but fewer (52%) acknowledged that AMU on UK dairy farms is currently too high, suggesting a mismatch between their intention to reduce antimicrobials and AMU behaviour. These results indicate that dairy farmers are aware of AMR, and their self-reported farm AMU has been reduced. However, some do not clearly comprehend the activity of antimicrobials and their correct usage. More work is needed to improve dairy farmers’ knowledge of appropriate AMU and intentions to combat AMR. Farmers would benefit from more regular AMU discussions and advice from herd veterinarians, as they were described as highly trusted information resources. Training on how to reduce AMU should involve all farm staff administering antimicrobials and should be tailored to farm-specific barriers, such as limited facilities and workforce shortages.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12917-023-03625-0.