Electrochemical devices for efficient production of hydrogen as energy carrier rely still largely on rare platinum group metal catalysts. Chemically and structurally modified metal dichalcogenide MoS2 is a promising substitute for these critical raw materials at the cathode side where the hydrogen evolution reaction takes place. For precise understanding of structure and hydrogen adsorption characteristics in chemically modified MoS2 nanostructures, we perform comprehensive density functional theory calculations on transition metal (Fe, Co, Ni, Cu) doping at the experimentally relevant MoS2 surfaces at substitutional Mo-sites. Clear benefits of doping the basal plane are found, whereas at the Mo- and S-edges complex modifications at the whole edge are observed. New insight into doping-enhanced activity is obtained and guidance is given for further experiments. We study a machine learning model to facilitate the screening of suitable structures and find a promising level of prediction accuracy with minimal structural input.