He served as mayor from 1938 to 1945, during which time he advocated the Fair Employment Practices Bill, which prohibited discrimination based on race, color, creed, and national origin in hiring or promotion practices. During his tenure as mayor, the Cocoanut Grove fire occurred in Boston. Prior to the fire, club owner Barney Welansky boasted that that club had not needed to adhere to fire codes because Tobin would not permit his club to be closed. Welansky was convicted of manslaughter, and Tobin himself only narrowly escaped indictment. Four years into Welansky's sentence, then-Governor Tobin pardoned him. In 1944, Mayor Tobin was elected Governor of Massachusetts, defeating the Republican candidate, Lieutenant Governor Horace T. Cahill. He served one term as governor from 1945 to 1947. Tobin proposed a liberal agenda that was not accepted by the Republican legislature. He called for additional unemployment benefits, veterans benefits, rent control, and laws to end racial discrimination in hiring. He was a strong supporter of labor unions. In 1946, he was defeated for re-election by his Republican opponent, Lieutenant Governor Robert F. Bradford.
Governor Tobin remained active in Democratic politics, however, and campaigned vigorously for President Truman in 1948. Tobin repeatedly denounced the Taft-Hartley Act of 1947, making 150 speeches against it in the 1948 election campaign. He argued that it was bad for workers. Upon Truman's reelection, Tobin was appointed as U.S. Secretary of Labor, a position he held until the close of the Truman Administration in January 1953. Tobin discovered that the Department of Labor had minimal influence; it did not control the National Labor Relations Board, or the Mediation Service, which were more influential. In 1949 he had president Truman transfer the United States Employment Service and the Unemployment Insurance Service to his department. He also managed to move several smaller bureaus, and he created a Federal Safety Council. Although the Democrats regained control of Congress in 1948 election, the Conservatives were still dominant and Tobin and Truman were unable to repeal Taft-Hartley. Tobin's most notable deed as Labor Secretary came in the Fair Labor Standards Amendments of 1949, which increased the minimum wage to 75 cents an hour, and strengthened the prohibitions on child labor. Tobin played a role during the Korean War in coordinating defense manpower needs. However, in the steel strike of 1952, Tobin came out on the side of the unions, saying that "the time for impartiality" had passed, and that the unions were justified in their wartime strike. In 1951, Tobin attacked Senator Joseph McCarthy, a fellow Irish Catholic, calling on fellow Catholics to repudiate McCarthy's "campaign of terror against free thought in the United States."