From what I understand, it was the chicken. Scientists from the U.K. did a study on this in 2010.
The scientists found that a protein found only in a chicken's ovaries is necessary for the formation of the egg, according to the paper Wednesday. The egg can therefore only exist if it has been created inside a chicken.
A different type of chicken came first and overtime it evolved into what we call a chicken. So before a chicken was something else so to have the chicken there had to be an egg. So technically the egg did come first.