M.B. Oglesby Jr., director of the White House office of congressional affairs, will leave the Reagan administration and be replaced by William L. Ball III, who holds a similar position at the State Department, informed sources said yesterday.

Oglesby, 43, has served in the congressional office throughout the Reagan presidency and became its director two years ago. He was widely credited in the administration and on Capitol Hill for playing a key role in House passage last December of Reagan's tax-overhaul legislation.

The sources said that Oglesby is likely to join the Washington office of a lobbying firm headed by Stuart K. Spencer, a longtime friend of Reagan and chief political architect of his 1980 presidential campaign. Oglesby would represent business clients rather than political candidates, the sources said.

Ball, 37, is a former administrative assistant to retired senator John G. Tower (R-Tex.) and worked for another former senator, Herman E. Talmadge (D-Ga.). He is not well known to Republican House members but recently was given their stamp of approval after a meeting with three members of the GOP House leadership.

Oglesby's depature is considered likely to further extend the authority of White House chief of staff Donald T. Regan, whose legislative tactics have been questioned by congressional members of his own party. Except on the tax-overhaul bill, which was managed by a Treasury Department team, administration legislative strategy in the White House has been increasingly centralized under the control of Regan and his principal deputy, W. Dennis Thomas.

Oglesby, who had strong ties to House members of both parties, was known to have differences with Regan over legislative strategy, particularly on tax and budget issues. But sources close to Oglesby said he would have left the White House in any event because he had served there five years and felt it was time to go.