Parturition is often a stressful period, when the incidence of disease is high after calving, which has been associated with an uncontrolled inflammatory response. Therefore, the objective of this study was to test the effect of the administration of a nonsteroidal anti-inflammatory drug (meloxicam) on the behavior, health, and production of peripartum cows. Meloxicam was dosed at 1 mg/kg of body weight, and an empty gel capsule served as a placebo. Both were administered orally with a balling gun. Dairy cows and heifers were randomly assigned to 1 of 3 treatment groups: (1) meloxicam administration before calving, with a placebo administered after calving (MEL-PRE, n = 60), (2) placebo administered before calving, and meloxicam administered after calving (MEL-POST, n = 69), and (3) a placebo administered before calving and after calving (CTL, n = 65). To identify imminent calving events, a vaginal thermometer was inserted approximately 2 wk before the expected calving date and a drop in temperature was used to identify cows close to calving. Calving events were monitored via video cameras, and the amount of time that elapsed between the appearance of the amniotic sac at the vulva until delivery of the calf was used to determine calving difficulty score. Eutocic calving events were defined as cows that calved in ≤70 min, and dystocia was defined as cows that took longer than 70 min to calve. Milk yield and components were measured for the first 15 wk of lactation and accelerometers were used to record activity and lying behaviors. The effects of treatment, breed, parity, calving difficulty, and, when applicable, a repeated measure, along with interaction terms, were analyzed in mixed models. Regardless of the time of administration, dystocic cattle that received meloxicam were less active than dystocic CTL. Dystocic animals displayed more lying bouts on the day of calving and then displayed fewer lying bouts and were less active during the days following calving. No effect of treatment was noted on any health outcomes. Eutocic MEL-PRE animals produced 6.8 kg/d more milk than eutocic CTL. Regardless of calving difficulty, MEL-PRE animals produced more milk fat, protein, and lactose (kg/d) than CTL. In conclusion, meloxicam administration before calving appears promising in increasing milk yield in eutocic cows.