Are papers entirely unrelated to my field going to hurt my chances in the future? For the past year I have been doing a postdoc in a Neuroscience lab, the position advertised was for computer science. 

For the first year, the work was mostly related to my discipline, but my PI's funding got cut and now he has been pushing me to write and do experiments in an area that is entirely out of my expertise or even my field (electrodeposition/ impedance characterization). To be honest, I do not like the area, and was not written anywhere neither in the job posting or the offer letter.

I got a postdoc offer in a different University, and have already accepted, but my PI is pushing me to delay my start date or even come back over the summer to finish these experiments and the paper. (Probably at my own expense, the position is in a different US state)

As I would like to apply for a Tenure track position after the coming Postdoc, I would like to know how much can this affect my chances, would a publication in a field that is not even remotely similar to my own (Machine Learning) can hurt me more than help me? 

I've tried to think on ways to turn it around so I can come with a feasible explanation on how is a paper on that topic even going to help build my ML expertise, but so far I have come with nothing.
A legitimate scholarly publication can only help you (although it might not help much).  If you're really worried you can always just leave it off your cv.