Forty-five multiparous and 18 primiparous Holstein cows were fed three levels of crude protein (CP), each at three levels of neutral detergent fiber (NDF), to identify optimal dietary CP and energy. Cows were blocked by parity and days in milk into seven groups of nine and randomly assigned to an incomplete 9 x 9 Latin square trial with four, 4-wk periods. Diets were formulated from alfalfa and corn silages, high-moisture corn, soybean meal, minerals, and vitamins. Forage was 60% alfalfa and 40% corn silage on all diets; NDF contents of 36, 32, and 28% were obtained by feeding 75, 63, and 50% forage, respectively. Dietary CP contents of 15.1, 16.7, and 18.4% were obtained by replacing high-moisture corn with soybean meal. Production data were from the last 2 wk of each period. Spot fecal and urine samples were collected from 36 cows to estimate N excretion using fecal indigestible acid detergent fiber (ADF) and urinary creatinine as markers. There were no interactions (P > or = 0.08) between dietary CP and NDF for any trait; thus, effects of CP were not confounded by NDF or vice versa. Intake of DM and fat yield were lower on 15.1% CP than at higher CP. There were linear increases in milk urea and urinary N excretion and linear decreases in N efficiency with increasing CP. Increasing CP from 15.1 to 18.4% reduced milk N from 31 to 25% of dietary N, increased urinary N from 23 to 35% of dietary N, and reduced fecal N from 45 to 41% of dietary N. Decreasing NDF gave linear increases in BW gain, yield of milk, protein, true protein, lactose, and SNF, and milk/DM intake and milk N/N intake, and linear decreases in milk urea. However, fat yield was lower on 28% than 32% NDF. Reducing NDF from 36 to 28% increased purine derivative excretion by 19%, suggesting increased microbial protein. Increasing CP by adding soybean meal to diets fed cows averaging 34 kg/d of milk increased intake and fat yield but depressed N efficiency. Increasing dietary energy by reducing forage improved milk yield and efficiency and decreased excretion of environmentally labile urinary N.