Roger Taney withdrew all federal funds from the Second Bank of the United States at Jackson's directive. Two previous Treasury secretaries had refused, and Jackson had removed them from office. Jackson had interpreted his re-election as a mandate to destroy the Bank (he had previously vetoed the bill to extend its charter) and by withdrawing federal funds he effectively accomplished this.
When Chief Justice John Marshall died, Taney was appointed Chief Justice to succeed him on the Supreme Court. As far as his position being contradictory; one might argue that Jackson's actions regarding the bank were unconsitutional which would be inconsistent with Taney's new position. Taney is most famous for his decision in Dred Scott vs. Sanford in which he invalidated the Missouri Compromise and stated that Scott, as a slave, was not a citizen and had no standing to sue for his freedom.