Trump has insisted Mexico would pay for building the wall, which experts said could cost about $22 billion and take more than three years to complete.
With Mexico refusing to pay, Trump has said since taking office in January that the wall will initially need US funding but that he will find a way to make Mexico ultimately pay for it.
Democrats in the US Congress, however, firmly oppose the border wall, and at least some Democratic senators would need to vote for its inclusion in a spending package.
The border wall lawsuit set to be filed on Wednesday will allege that Trump's wall violates federal environmental standards, as well as constitutional provisions regarding the separation of powers and states' rights, a Becerra spokesperson said.
Last month the Trump administration said it had selected four construction companies to build concrete prototypes for a wall, which will be will be 30 feet (9 meters) tall and about 30 feet wide and will be tested in San Diego.