In 1877 there were basically 2 good team: Boston and Louisville. Starting in August, Louisville went on an 8 game losing streak, and finished the season 7 games behind Boston. Louisville's team president, Charles Chase, investigated his own team, and 4 players - including Jim Devlin - confessed to taking bribes to throw the games. Chase took the step of suspending his players, and the League made permanent their suspensions at the winter meetings.
1877 was the second year of the National League. From its very first, Major League Baseball has had lifelong bans for players involved in gambling or throwing games. Whether a sign was posted in the locker room or not, this has always been the way. Look back 2 years earlier, and you can see some of the reasons why.