How to motivate myself to do more than the bare minimum that is required of me? First, I should assure you this is a question about life in academia.

I am currently studying for a Master's degree in mathematics at a top university. I also have a Master's degree in Artificial Intelligence from another top university. 

I get a lot of pleasure when I study and understand new ideas. I won't say studying mathematics is easy but in general I do not encounter significant difficulties to understand theorems and proofs when I sit down and go through them. I have also done a fair amount of research. I am preparing for publication my previous Master's dissertation and my current supervisor wants to take me on for a PhD. 

I know I can handle research and I know I can understand thoroughly a subject.  However, I feel extremely superficial. I almost always do the bare minimum. For example, the way I study for an exam involves reading all of the lecture notes to get a feel for the general ideas. Then I understand how these ideas fit together. I go through some of the details and I ensure that in principle I could understand them. 

At this point I get in a conflicting state. I feel complacent because I have determined that in principle it is just a matter of time to work out the details and this just feels tedious. When I do try to work out the details I feel extreme repugnance. Forcing myself to do it leads to breakdowns but I've learned to manage that. This struggle continues with the result that I usually get an A or a B or the bare minimum to satisfy my supervisor if I'm working on a research project.

I cannot overcome this dreadful feeling and this issue often stands in the way when I try to develop my own ideas. The first glimpse of understanding the principles of a concept leads to inability to invest any more effort in developing my ideas. Then, I find myself reading some easily digestible article on the internet. 

I want to continue doing research and stay in academia. But I often feel helpless. I have tried a lot of schemes to motivate myself, including trying to talk myself into persisting, reading self-help books, and devising an axiomatic system to explain to myself what it means to be interested in something. 

There is of course incremental improvement but far from efficiency. I cannot imagine myself doing anything else but research. However, I feel that once I get into pure research and there is no more explicit structure I would get completely lost.

How can I motivate myself to persist in such a situation? How can I overcome such complacency?
Wow.

While I was reading your question, I was thinking "did I just wrote that myself and erased it from my memory"? I just started my PhD in Mathematics, having obtained my Master's Degree last semester..

You pointed several problems we face as students of Mathematics who are trying to become researchers. One of them, which has drawn most of my attention, is this 'repugnance' from the details of something you already been through. I usually deal with this situation as follows: some of those details (in a proof, in a exercise, etc) are either too boring or too hard. If they're too boring, I usually make sure myself that I can remember them should I need them (in a exam, for example). If they're too hard, I usually try to convince myself that it won't be in the exam of the subject I'm studying for (this does not mean that I study only for exams!).

Whenever I am done with some subject, I choose another one to keep studying. As a PhD student I usually feel that there are a lot os subjects I should have mastered and a lot other which I should have some knowledge of. I usually use those 'confliting states' to switch to another subject which I have chosen by myself (not related to the lectures I'm attending). For example, I'm now having Several Variables Holomorphic Functions and Riemannian Geometry courses, but also reading a textbook of Theory of Foliations since I'm sure I'll need it next semester. It's not my priority though.

Now, keep in mind that you're not striving for the minimum at all times. Reaching a PhD course after obtaining your Master's degree is a really big deal. Are you really sure that A's and B's are the minimum that keeps your advisor satisfied? My advisor complimented me on my grades from Master's Degree Courses once, and it was full of B's, two A's and one ugly C!