Heinz Doofenshmirtz (2nd Dimension) is the ruler of the Second Dimension Tri-State Area, Doctor Heinz Doofenshmirtz's counterpart, and the main antagonist of the Disney original movie, Phineas and Ferb the Movie: Across the 2nd Dimension.
Doofenshmirtz meets Doofenshmirtz 2 when he slides into his office on a theme ride-like chair. At first, the two become friends, singing A Brand New Best Friend (and It's Me), Just before Phineas, Ferb, and Perry enter the office as well. Doofenshmirtz 2 instantly recognizes Perry as a secret agent, but Doofenshmirtz is unconvinced, as is Phineas and Ferb, as Perry is in his mindless pet mode. Doofenshmirtz 2's attempt to unmask Perry's identity by having Platyborg assault Perry fails when he appears to be unharmed. However, he displays his first sign of his more sinister personality when he commanded Platyborg to attack Phineas and Ferb next, to which Perry is forced to reveal his secret identity. The trio then makes their escape, and both Doofenshmirtzs cry out, "CURSE YOU, PERRY THE PLATYPUS!"
Later, he finds out about his counterpart's incompetence when Doofenshmirtz continues to fail in identifying Perry to be his nemesis after showing him a set of photos of Perry in both pet mode and secret agent mode. He then tells him of his loss of Choo-Choo, to which he finds out that Doofenshmirtz, ironically, had a much harsher childhood. He also decides to conquer the 1st Dimension's Tri-State Area.
Doofenshmirtz 2 then announces to Perry via news broadcast that if he turns himself in, then Phineas and Ferb will continue to go by unharmed. Perry turns himself in, but Doofenshmirtz 2 tells him that he won't keep his end of the deal, as he needs the two boys in repairing Doofenshmirtz's Otherdimensionator because they did so before. He later attempted to use Perry as leverage against Phineas and Ferb, but Perry distracts him, Doofenshmirtz, and the Norm bots with an image of Major Monogram having a shower and he escapes with his owners and their companions. However, the Norm bots manage to recapture Perry, Phineas, Ferb, and Candace after a brief chase in the mine-cart railroads used by the Resistance.
Doofenshmirtz 2 soon becomes annoyed by Phineas's constant refusal to rebuild the Otherdimensionator, but when Doofenshmirtz 2 finds out how the two boys did it, he sentences them to be eaten by his pet Goozim, along with Doofenshmirtz when he annoys him, but the five are rescued by Candace 2, who tosses them a remote version of the Otherdimensionator, which they use to travel several dimensions. Meanwhile, Doofenshmitz 2 uses the rebuilt Other-dimensionator to enter the 1st Dimension, which he invades using a vast army of Norm bots.
However, the 1st Dimension characters, led by Phineas, Ferb, and Perry, all retaliate, destroying many Norm bots. Phineas and Perry confront Doofenshmirtz 2 and eventually manage to defeat Platyborg and destroy a satellite dish controlling the Norm bots, to which Doofenshmirtz 2 angrily attempts to kill them, along with a recently-arrived Ferb, with a larger robotic version of himself. He then reforms and gets arrested.