The U.S. Justice Department accused Oracle Corp. of defrauding the federal government on a software contract that involved more than $1 billion in sales.

The agency alleged Thursday that Oracle misrepresented its commercial sales practices, causing government customers to receive deals that were inferior to those Oracle gave its commercial customers, according to a complaint filed in U.S. District Court for the Eastern District of Virginia. The Justice Department also alleges that Oracle went out of its way to hide these...