Actually there is a very easy way to do this which I realized when I saw the question again.
I take the equation of circle as $C(x,y) = x^2 + y^2 + 2gx + 2fy +c$
The center of circle is $(-g,-f)$, we can write the normal vector to the line segment made by chord as:
$$ n = (x_m + g , y_m +f)$$
That is the vector connecting center of circle to mid point of chord. We can also write a vector along the chord as:
$$ r = (x-x_m,y-y_m)$$
We have:
$$ n \cdot r = 0 \iff (x-x_m) (x_m+g) + (y_m +f)(y-y_m) =0 \iff xx_m + xg -x_m^2 - x_m g + y_m y -y_m^2 +fy -fy_m=0$$
Rearranging terms in the double implication, we have:
$$ xx_m + yy_m +gx + fy = x_m^2 + y_m^2 + fy_m + gx_m$$
Adding $c$ on both sides, we can write:
$$ xx_m + y y_m + gx +fy + c = C(x_m,y_m)$$
Which is what was required.