Hackers believed to be affiliated with Russia’s military breached the Ukrainian gas company where former Vice President Joe Biden’s son had served on the board as it became a focus of the impeachment inquiry into President Trump, according to a U.S. cybersecurity firm.

Attempts to hack into Burisma Holdings began last November as Congress was holding hearings on whether Mr. Trump abused his office by pressuring his Ukrainian counterpart to work with his personal lawyer, Rudy Giuliani, to investigate Mr. Biden and his son Hunter,...