The application of a metal-organic framework (MOF) has expanded into the area of heterogeneous catalysis, gas storage and separation, drug delivery, and lightweight magnets. Herein, we investigate the nature of olefin and paraffin binding on Fe/MOF-74 and identify several factors that determine separation efficiency using the first-principles calculations. The calculated binding energies and magnetic orderings are in excellent agreement with those observed in experiments. While the olefin strongly interacts with Fe atoms through a well-known pi-complexation, the HOMO - 1(2) of the paraffin weakly interacts with Fe atoms without back-donation, facilitating the olefin-paraffin separation primarily. However, the mutual gas-gas interactions and magnetic transitions of the MOF host also contribute significantly to the total binding energy of each gas molecule as much as 2-28% and 6-8%, respectively, emphasizing the necessity that these subtle effects must be handled carefully when considering selective binding with small energy differences. In particular, Fe/MOF-74 is shown to be a unique system where the guest-dependent magnetic transition observed only for the olefin adsorption is a secondary reason for the high olefin-paraffin adsorption selectivity measured. The understanding of the hydrocarbon binding energetics can provide a way to modify MOFs for enhanced separation/sorption properties that can be complemented by principles of kinetic separation.