While modelling a character, I modelled the legs separates but now I want to merge both objects at the crotch area, but whenever I press "M" to merge the vertices at the crotch area I get a totally different result. It doesn't matter if I select "At Center" or "At Cursor" or anything, I still get this same result.
Press S, 0 keys to scale the selected vertices to a single point - this point is the Pivot Point, which by default is the Median Point (center). You can press . (dot) key to bring up Pivot Point choice, and switch it to e.g. 3D Cursor.
Keep in mind this will produce two vertices, one for each object. Separate objects can't share a vertex. You could merge both objects into one by selecting both and pressing ✲ CtrlJ, then merging will work…