Keynes wanted to save capitalism from itself and thought the state needed to play a role because laissez faire capitalism had structural flaws such as that the expected or "normal" rate of interest is too high and the rate of investment is too low. He thought that the state should support and stimulate the money demand which tends to lag chronically behind production and individual capitalists should be constantly urged to reinvest from their profits.
Keynesianism has a lot to do with effective demand:
https://en.wikipedia.org/wiki/Effective_demandMarx thought capitalism was just one specific historic mode of production and would eventual be overcome because of its own internal contradictions such as the tendency of the rate of profit to fall:
https://en.wikipedia.org/wiki/Tendency_of_the_rate_of_profit_to_fallMarx was more of a classical economist and Keynes is related to marginalist theory, there methodologies and concerns are to different to really compare