An exhaustively researched book published a couple of years back called "On the Origin of Hockey" makes a very strong case for hockey as we know it being "invented" if you will in Great Britain... The origins of hockey in Canada are at least academically first ascribed to have being played on March 3rd 1875 in Montreal, in that it was the first game recorded & published in a media report., played under what are called the Montreal Rules. Taken mainly from Field Hockey though physically & otherwise somewhat more resembling Rugger & Rugby, bit of Lacrosse thrown in for good measure.
Prior to that hockey in Canada & in the US (New England, Virginia & the Dakotas) is mentioned anecdotally in diaries, papers & novels going back to the early 1830's, sometimes referred to as "Shinny, Shinty, Ice Polo" and other names.... As for the NHL, it was formed in 1917 by member clubs of the NHA in order to divest themselves of an unwanted owner, the troublesome Eddie Livingstone of Toronto. Many historians make no differentiation between the NHA which was formed in 1909 to the NHL, just as many historians dont make any differentiation between WW1 & WW2, that the intervening years were merely a cessation of military hostilities only, that WW1 & 2 are but one war.