When people ask this question they usually refer to the modern version they are used to see in the TV. The catch is, there is no clear cut answer for this question as when you start digging into the information, there is a lot of history of different games that baseball could have evolved from.
The myth that most people believed was that Abner Doubleday was the creator of the game of baseball in Cooperstown in 1839. This story is not true, in 1839 Mr. Doubleday was in West Point and he really never acknowledge having anything to do with baseball. This story was supported by Cooperstown businessmen in order to drive traffic to the Baseball Hall of Fame.
The best piece of info that we could find was going to Wikipedia's Origin of Baseball. There was a list of different games that had some elements similar to baseball. Some of these games were:
Out of all these games, we can say that the one that is most similar to baseball is Rounders. Rounders, like Baseball, consisted of hitting a pitched ball with a bat and rounding 4 bases in order to score a point. Another similarities were that in order to get an out, the fielder must catch the ball in the air, the fielder has to tag a batter while running to a base or if the fielder touches the bag to which the batter is running to, with the ball. Also, nine players form a team, with the fielding team has a bowler or what we would call the pitcher, the backstop (catcher), a player on each of the four bases, and three deep fielders or what we call outfielders. Here you can see some highlights of how rounders is played.
Rounders first set of known rules in London were published by William Clarke in the second edition of the Boy's Own Book in 1828. However, in America, the first set of known rules for a game of baseball were the Knickerbocker Rules in 1845 by the New York city "base ball" club that was named the Knickerbockers.
Alexander Cartwright, who was the organizer of the Knickerbockers, is refer as to the "father of baseball". The Knickerbocker rules introduced many of the rules we know now like, three out for an inning, tagging for an out instead of throwing the runner with the ball and foul balls and foul lines. After much time, Alexander Cartwright was finally credited by Congress for inventing the modern game of baseball in 1953, he was already dead by that time and a member of the Baseball Hall of Fame. However many historians are sure that these rules were used and experimented with by other clubs in the New York area before the time of the Knickerbocker rules were signed.
In 1857 delegates from 16 New York clubs met at a convention to standardize the rules of the different clubs . The convention agreed to the unified Knickerbocker-Gotham-Eagle but made some revisions to it. Some of the revisions were establishing the nine inning games, force out at any base and 90 feet distance between the bases. That convention established the National Association of Base Ball Players as the governing body who existed as an amateur league for 12 years.
All this information surely is confusing and non definitive. We wanted to give you some background information and history about the game that you enjoy and there is a lot more information behind WHO and HOW exactly was this game invented. After all that, we can conclude this:
-The first baseball game in America was played around the 1840's
-Baseball evolved from an English game, probably rounders.
After reading all this, we will give you a more definite answer to another question you might have and that you can say with certainty at a party with friends: MLB was founded in 1903 when the American League and National League, which operated independent from one another, were declared equal to one another leading to them signing a new agreement which lead to the creation of the World Series and the two leagues being called the Major Leagues. All of the other leagues and associations were called then the minor leagues.