WASHINGTON—The U.S. government’s budget deficit widened in the first eight months of its fiscal year, reflecting lower revenues from corporate taxes combined with ramped-up government spending. The deficit, or the difference between the amount of money the federal government spent and what it took in, totaled $532.24 billion in October through May, the Treasury Department said Tuesday. That was 23% more than the deficit of $432.85 billion during the same period a year earlier and reflected a 6% rise in government spending that outpaced a 3% increase in revenue. Tuesday’s report showed the federal budget deficit was $146.80 billion in May, 66% wider than the same month a year earlier. Government revenue fell 10% last month compared with a year earlier, while spending grew 11%. Corporate-income taxes from October through May were about 25% lower than the first eight months of fiscal 2017, pulling down revenues. “You have corporations paying less in taxes at the same time that they’re getting more in deductions,” said Lindsay Koshgarian, program director at National Priorities Project. “It’s kind of a double whammy of paying less.” Over the same period, individual income taxes rose, which could partially be explained by the low unemployment rate. “Individuals are paying more total, but each individual could be paying less,” Ms. Koshgarian said. “If you have more people paying in, you can still get more money out.” Meanwhile, spending in the first eight months of the fiscal year increased from a year earlier for military programs, Homeland Security and Medicare and Medicaid. The rising budget deficit generally tracks with projections from the nonpartisan Congressional Budget Office that spending would outpace revenues. For the full fiscal year, the CBO this spring estimated the budget deficit would total $804 billion, up from the $665 billion shortfall seen in fiscal 2017. The CBO raised its estimate for this year’s deficit largely because tax cuts were expected to translate into lower revenues while the government also ramped up spending on military and domestic programs. The 2018 fiscal year will end Sept. 30.