In the search for materials with exceptional mechanical properties, we have developed a machine-learning model to predict the elastic moduli of inorganic materials, which act as a proxy for hardness. Materials project database of elastic moduli has been used as the training set and the machine learning model is developed using support vector regression method implementing 150 compositional and structural variables. Further, a genetic algorithm-based variable selection is performed using partial least square regression method resulting in a cross-validated root mean square error (RMSE) of 17.2 GPa and 16.5 GPa for bulk and shear modulus respectively. Subsequently, 118,287 compounds from crystalline databases are screened regardless of their chemical composition and atomic disorder for compounds with high bulk and shear moduli having potential for superhardness. We then identified compounds of two interest, a ternary rhenium tungsten carbide and a quaternary molybdenum tungsten borocarbide for experimental investigation. These materials synthesized using arc melting and characterized with high-pressure diamond anvil cell measurements to confirm the machine learning predictions with <10% error. Vickers microhardness measurements revealed the extremely high hardness nature of these compounds making these the hardest transition metal carbide and borocarbide reported. The successful identification of these superhard materials using state-of-art machine learning and materials screening techniques emphasizes the effectiveness of these methods in materials discovery and development.