Lameness is widely recognized as one of the most serious welfare and production concerns in the dairy industry. Our objectives were to evaluate the associations between lying behavior and lameness, and to determine whether lying behavior can be used as a diagnostic tool for lameness. Electronic data loggers recorded lying behavior of 1,319 cows from 28 farms at 1-min intervals for 5 d. These cows were gait scored according to a 5-point Numerical Rating System (NRS), and categorized as NRS ≤2, NRS = 3, or NRS = 4; no cow was scored as NRS = 5. Lameness was dichotomized twice: LAME (NRS ≥3) and SEVLAME (NRS = 4). Data were divided into 2 groups: 11 farms using deep-bedded stalls (DB) and 17 farms using mattress stalls (MAT). Differences in the daily lying time (h/d), frequency of lying bouts (n/d), duration of lying bouts (min/bout), and the standard deviation of bout duration (min/ bout) between LAME or SEVLAME cows and those that were not were tested using mixed models. Receiver operating characteristic curves were constructed to identify behavioral thresholds to distinguish SEVLAME cows from the rest. Odds ratios for SEVLAME were estimated using logistic regression. Overall, 28.5% of cows were LAME including 7.3% that were SEVLAME. The prevalence of SEVLAME was higher on MAT farms than on DB farms (9.3 ± 1.3 vs. 4.4 ± 1.2%, respectively). SEVLAME cows on DB farms spent 12.8 [confidence interval (CI): 12.0 to 13.7] h/d lying down compared with 11.2 (CI: 10.7 to 11.8) h/d for cows that were not SEVLAME. These cows had longer duration of lying bouts [95.3 (CI: 84.6 to 107.3) vs. 80.3 (CI: 74.9 to 86.1) min/bout] and greater SD of bout duration [44.4 (CI: 41.1 to 48.0) vs. 50.7 (CI: 44.1 to 58.3) min/bout]. There were no behavioral differences among lameness categories on MAT farms. Within DB farms, cows with lying times >14.5 h/d had 16.2 (5.8 to 45.2) times higher odds of being SEVLAME. Cows with average lying bouts >90 min/bout were at 3.0 (1.2 to 7.4) times higher odds of being SEVLAME, and cows with average SD of bout duration >55 min/bout were at 4.1 (1.7 to 9.9) times higher odds of being SEVLAME. These results show that high lying times, long lying bouts, and variability in the duration of lying bouts were associated with lameness, and that stall surface influenced the behavioral responses of lame cows.