You don't say how you know that your 2nd great-grandfather was born in the 1840s in Baltimore, so I'll begin with a caution -- be aware that when people were asked about their birthplace, they sometimes give the name of the nearest big city instead of the name of the place they were born. If you can't find records in Baltimore itself, your ancestor may have been born somewhere nearby. Sometimes people also say they were "from Baltimore" and a researcher might assume they were born there, but their family could have moved there when the person was very young. First children can be born in different towns than where a family lived if the mother went to stay with other relatives for the birth of the child. So take a moment to reconsider where you got that starting information and what the quality of the information might be.
For an overview on how to find Maryland Birth Records, see the article in the FamilySearch research Wiki: How to Find Maryland Birth Records. According to the article, Baltimore City began recording births in 1875, which is long after the 1840s time period you've asked about.
For Births 1694 thru 1864 the article says:
- No government records were kept.
- In 1694 the Clerks of the Protestant Episcopal Church were required to keep record of all births, regardless of the family's
membership.
- Other denominations kept their own records of births.
Copies of Church birth records may be available from the Maryland
State Archives or in the FamilySearch Catalog.
Click through to the article to get more information about requesting help from the Maryland State Archives.
If you can't find a record in a collection that is neatly labelled "birth records" then you have to search for the information in other ways. The FamilySearch Wiki's United States Record Selection Table is a good place to start. Many of the entries in the table have links to other articles in the Wiki, such as this one on United States Church Records. Do you know what church your ancestor attended? If not, step back and make that your new goal.
Sometimes it is necessary to move forwards in time before moving backwards. If you haven't done so already, make a timeline of your ancestor's life, and re-examine all the source records you have found, starting with a review of any probate records or death records. Records created at the end of a person's life can give a more complete picture of someone's life than records created when they were younger -- you have a richer choice of identifiers which will help you make sure you have the right person, and not someone else with the same name.
Sometimes no birth record is available, and you have to build a case for who someone's parents are based on other records, or records about other people, like your ancestor's siblings. Look at all the records for the siblings as a group. Also consider widening the field to include FAN research -- the study of friends, associates, and neighbors. Men who appear in records about your ancestor could be husbands of sisters, and the sisters' records could help you find the information you want.
Maryland Resources from the Family Search Wiki:
Quicklessons from Elizabeth Shown Mills' Evidence Explained: