Devices that record behavior automatically have made it possible to accurately measure the lying and eating behavior of large numbers of dairy cows. During lactation, weight, feed intake, and production of cows change; however, longitudinal studies of how the behavior of dairy cows is correlated with production traits during lactation are limited. This study describes changes in duration of lying and eating behavior throughout lactation and how these variables are related to changes in milk yield, live weight, and feed intake in lactating primi- and multiparous Holstein and Jersey cows. Data were from 255 cow lactations (43 primi- and 80 multiparous Jersey cows, and 56 primi- and 76 multiparous Holstein cows) from 5 to 200 d in milk. Leg-mounted tags were used to record lying time and steps; ad libitum feed intake (of a partial mixed ration) variables were recorded from feed bins on weight cells; and milk yield and live weight were recorded during automatic milking, all on a daily basis. The lactation trajectory was split into 4 segments. Data were analyzed using mixed effects linear models. Holstein cows spent more time lying and eating than Jersey cows, whereas Jersey cows had a greater number of steps (25-37%). First-lactation cows spent less time eating and had more steps than older cows. Average daily lying time was approximately 1 h longer during February than the shortest lying time, which was observed in August. Both Holstein and Jersey multiparous cows had longer lying times than cows in first parity after parturition; however, the lying time of multiparous cows decreased, whereas that of primiparous cows increased in the beginning of lactation. Later in lactation, older cows tended to increase duration of lying more than younger cows did. The daily change in behavior (lying, eating, and steps) and milk yield, live weight, and dry matter intake, characterized as slopes in the lactation period for each cow, were not strongly correlated. However, we found a moderate correlation between changes in milk yield and dry matter intake, and between changes in eating time and rate of eating. An increase in eating rate in multiparous Holstein cows was correlated with increasing lying time. In conclusion, the use of automated behavior recording enabled thorough investigations of relationships between a range of behavior traits and frequently recorded production traits, and revealed that patterns of change during lactation are strongly affected by breed and parity.