The law of diminishing marginal product is caused by the law of diminishing marginal returns. This, in turn, is caused by the fact that some inputs in a production process are fixed and some are variable.
In the short run, a firm has some fixed inputs and some variable inputs. As the variable inputs rise, the firm should be able to produce more goods or services. Let’s say that you have a hamburger stand and you have two large cooking surfaces. These are your fixed inputs. One of your variable inputs will be labor. As you start to hire people, your marginal product will initially rise. When you have zero workers (no inputs), you have no product. When you hire your first worker, you start to produce. If that worker makes 20 hamburgers per hour, their marginal product is 20 hamburgers per hour. Now you hire a second worker. That makes work go even faster because they can each work one cooking surface. Now they make 50 hamburgers per hour between them. The marginal product of the second worker is 30 hamburgers. Marginal product is rising.
But now let’s say you hire a third worker. That worker can be helpful. They can get buns ready and put on condiments, perhaps, but they really aren’t adding as much. All three workers together make 65 hamburgers per hour. Marginal product for the third worker is only 15. You are now facing declining marginal product.
This happens because some of your inputs are fixed. There are only two cooking surfaces so your third worker cannot work on cooking more hamburgers. This is the cause of the law of diminishing marginal product.