PG&E Corp. knew for years that hundreds of miles of high-voltage power lines could fail and spark fires, yet it repeatedly failed to perform the necessary upgrades.

Documents obtained by The Wall Street Journal under the Freedom of Information Act and in connection with a regulatory dispute over PG&E’s spending on its electrical grid show that the company has long been aware that parts of its 18,500-mile transmission system have reached the end of their useful lives.

The...