History is the study of past specifically how it relates to human. it relates to the past as well as the memory, discoveries, collection, organisation, presentation and interpretation of information about these events. 
a legend is a narrative of human action that are perceived both by tellers and listeners to take place within human history, and posses certain qualities that gives the tell certain plausibility. legends may be miracles that are perceived as actually having happened and may be transformed after time in order to keep it's realistic .
                         i hope that this will help u.     
History is the study of the past and also history is based on actual events and legend may or may not be based on real events.This is the main and important key difference between history and legend.